set_var_labels | R Documentation |
Set variable labels for a data frame using name-label pairs.
set_var_labels(data, ...)
data |
data frame containing variables to be labelled |
... |
Name-label pairs the name gives the name of the column in the output and the label is a character vector of length one. |
If no label is provided for a variable then the existing label will not be changed. To remove a label set the label to NA.
set_labels()
for setting variable labels using a data frame,
extract_labels()
for creating a data frame of all variable labels,
clear_labels()
for removing variable labels
# set labels using name-label pairs
# and return labelled data frame
data("ctDNA")
ctDNA |> set_var_labels(
ctdna_status="detectable ctDNA",
cohort="A cohort label")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.