Returns the key variables stored for a dataset with admiral_df().
Value
The key variables as a list of symbols, in key order, so that they
can be passed to a by_vars argument or back to admiral_df(); an empty
list if the dataset has been declared to have no key variables; or NULL if
its keys have not been set. The keys are never inferred.
See also
Utilities used within Derivation functions:
admiral_df(),
extract_unit(),
get_dataset_class(),
get_dataset_name(),
get_flagged_records(),
get_not_mapped(),
get_vars_query()
Examples
library(tibble)
advs <- tribble(
~USUBJID, ~PARAMCD, ~AVISIT, ~AVAL,
"1", "DIABP", "BASELINE", 51,
"1", "SYSBP", "BASELINE", 121
)
get_dataset_keys(advs)
#> NULL
advs <- admiral_df(advs, dataset_keys = exprs(USUBJID, PARAMCD, AVISIT))
get_dataset_keys(advs)
#> [[1]]
#> USUBJID
#>
#> [[2]]
#> PARAMCD
#>
#> [[3]]
#> AVISIT
#>
