Closed edelarua closed 6 months ago
Currently, for datasets with named labels, when col_labels is applied the list is flattened and labels are repeated (i.e. ARM.ARM). This occurs in some cases where labels are reassigned via formatters::var_labels (such as in TMC).
col_labels
ARM.ARM
formatters::var_labels
Example:
ADSL <- scda::synthetic_cdisc_dataset("latest", "adsl") adsl_labels <- formatters::var_labels(ADSL) formatters::var_labels(ADSL) <- adsl_labels attr(ADSL$STUDYID, "label") #> STUDYID #> "Study Identifier" teal.data::col_labels(ADSL)[1:5] #> STUDYID.STUDYID USUBJID.USUBJID #> "Study Identifier" "Unique Subject Identifier" #> SUBJID.SUBJID SITEID.SITEID #> "Subject Identifier for the Study" "Study Site Identifier" #> AGE.AGE #> "Age"
Created on 2024-02-26 with reprex v2.1.0
Currently, for datasets with named labels, when
col_labels
is applied the list is flattened and labels are repeated (i.e.ARM.ARM
). This occurs in some cases where labels are reassigned viaformatters::var_labels
(such as in TMC).Example:
Created on 2024-02-26 with reprex v2.1.0