extract_labels.RdExtract variable labels from data and return a data frame with labels
extract_labels(data, sep = "_")All variable names will be returned, even those with no labels. If the label attribute has length greater than one the values will be concatenated and returned as a single string separated by sep
# Set a few variable labels for ctDNA
data("ctDNA")
ctDNA <- ctDNA |> set_var_labels(
ctdna_status="detectable ctDNA",
cohort="A cohort label")
# Extract labels
extract_labels(ctDNA)
#> variable label
#> 1 id Patient ID
#> 2 cohort A cohort label
#> 3 ctdna_status detectable ctDNA
#> 4 time Number of weeks on treatment
#> 5 size_change Percentage change in tumour measurement