View source: R/label_to_colnames.R
label_to_colnames | R Documentation |
This function sets variable labels as column names, to use "labelled data" also for those functions that cannot cope with labelled data by default.
label_to_colnames(x, ...)
x |
A data frame. |
... |
Optional, unquoted names of variables that should be selected for
further processing. Required, if |
x
with variable labels as column names. For variables without
variable labels, the column name is left unchanged.
data(iris) iris <- var_labels( iris, Petal.Length = "Petal length (cm)", Petal.Width = "Petal width (cm)" ) colnames(iris) plot(iris) colnames(label_to_colnames(iris)) plot(label_to_colnames(iris))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.