powered by
data.frame
Variable labels can be stored as a label attribute for each variable. This functions sets all non-missing (non-NA) variable labels in a data.frame
label
var_labels(x) <- value
a data.frame object
new variable labels, NA removes the variable label
NA
modifies the variable labels of x
x
# NOT RUN { x <- iris var_labels(x) var_labels(x) <- paste("label for", names(iris)) var_labels(x) if(interactive()){ View(x) # in RStudio data viewer labels are displayed } # }
Run the code above in your browser using DataLab