set_var_labels {reportRmd} | R Documentation |
Set variable labels
Description
Set variable labels for a data frame using name-label pairs.
Usage
set_var_labels(data, ...)
Arguments
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. |
Details
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.
Examples
# set labels using name-label pairs
# and return labelled data frame
ctDNA |> set_var_labels(
ctdna_status="detectable ctDNA",
cohort="A cohort label")
[Package reportRmd version 0.1.0 Index]