extract_labels: Extract variable labels from labelled data frame
Description
Extract variable labels from data and return a data frame with labels
Usage
extract_labels(data, sep = "_")
Arguments
data
the data frame to extract labels from
sep
character used to separate multiple labels, defaults to "_"
Details
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 ctDNActDNA <- ctDNA |> set_var_labels(
ctdna_status="detectable ctDNA",
cohort="A cohort label")
# Extract labelsextract_labels(ctDNA)