
Detect the suggested epidemiological role of a column.
Source:R/dataset.R
morie_dataset_detect_role.RdDetect the suggested epidemiological role of a column.
Examples
morie_dataset_detect_role(1:5, "case_id") # "id"
#> [1] "id"
morie_dataset_detect_role(c(0, 1), "treatment_arm") # "treatment"
#> [1] "treatment"
morie_dataset_detect_role(c(0, 1, 0), "outcome_event") # "outcome"
#> [1] "outcome"
morie_dataset_detect_role(c(1, 2, 3), "foo") # "covariate"
#> [1] "covariate"