powered by
Set variable labels for a data frame using name-label pairs.
set_var_labels(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 using name-label pairs # and return labelled data frame ctDNA |> set_var_labels( ctdna_status="detectable ctDNA", cohort="A cohort label")
Run the code above in your browser using DataLab