renameVars {iNZightTools}R Documentation

Rename column names

Description

Rename column names and returns the result along with tidyverse code used to generate it.

Usage

renameVars(.data, to_be_renamed_list)

Arguments

.data

a dataframe with columns to rename

to_be_renamed_list

a list of the new column names assigned to the old column names ie. list('old column names' = 'new column names')

Value

original dataframe containing new columns of the renamed columns with tidyverse code attached

Author(s)

Owen Jin

See Also

code

Examples

Run examples

renamed <- renameVars(iris,
    to_be_renamed_list = list(Species = "Type", Petal.Width = "P.W"))
cat(code(renamed))
head(renamed)


[Package iNZightTools version 1.12.2 Index]