Returns the ADaM class declared for a dataset with admiral_df() if there is
one, and otherwise the class inferred from its variables and records, see
infer_dataset_class().
Value
A character scalar: the declared class, or the inferred one (which may
be "other" or NA, see infer_dataset_class()).
See also
Utilities used within Derivation functions:
admiral_df(),
extract_unit(),
get_dataset_keys(),
get_dataset_name(),
get_flagged_records(),
get_not_mapped(),
get_vars_query()
Examples
library(tibble)
advs <- tribble(
~STUDYID, ~USUBJID, ~PARAMCD, ~AVAL,
"P", "1", "DIABP", 51,
"P", "1", "SYSBP", 121
)
# no class has been declared, so it is inferred
get_dataset_class(advs)
#> [1] "BDS"
# a declared class takes precedence
advs <- admiral_df(advs, dataset_class = "TTE")
get_dataset_class(advs)
#> [1] "TTE"
