rename_vars {iNZightTools} | R Documentation |
Rename column names
Description
Rename columns of a dataset with desired names
Usage
rename_vars(data, tobe_asis)
Arguments
data |
a dataframe with columns to rename |
tobe_asis |
a named list of the old column names assigned to the new column names ie. list('new column names' = 'old column names') |
Value
original dataframe containing new columns of the renamed columns with tidyverse code attached
Author(s)
Zhaoming Su
See Also
Examples
renamed <- rename_vars(iris, list(
sepal_length = "Sepal.Length",
sepal_width = "Sepal.Width",
petal_length = "Petal.Length",
petal_width = "Petal.Width"
))
cat(code(renamed))
head(renamed)
[Package iNZightTools version 2.0.1 Index]