Skip to contents

Sets the id_var metadata attribute of object

Usage

set_id_var(object, id = "index_id", standardize = TRUE, ...)

Arguments

object

a data.frame

id

character string at least partially matching a column in object

standardize

whether to rename the column specified by id to "id"

...

unused

Value

a modified version of object

Examples

serocalculator_example("example_pop_data.rds") |>
  readr::read_rds() |>
    set_id_var(id = "index_id") |>
    attr("id_var")
#> [1] "id"