Description Usage Arguments Value Examples
applyLabels will take either a single variable or a list of variables and apply a set of labels.
1 | applyLabels(data, varlist, labels, fullLevels = NULL)
|
data |
Input data.frame that contains the to-be labeled variable(s) |
varlist |
Vector of to-be labled variable names |
labels |
Vector of labels to apply to the selected variable(s) |
fullLevels |
if the length of labels does not match the number of levels found in data, this will provide the 'theoretical' full levels that 'labels' was based on |
A data.frame with labels added to the variables listed in varlist
1 2 | #fakeData <- data.frame(x = sample(c(0, 1), 10, replace=T))
#applyLabels(data = fakeData, varlist = c("x"), labels = c("No", "Yes"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.