renameByPairs: Changes column names based on vectors containing old and new...

View source: R/renameByPairs.R

renameByPairsR Documentation

Changes column names based on vectors containing old and new colNames

Description

[Stable]

Usage

renameByPairs(df, currentNames, newNames)

Arguments

df

data.frame/tibble

currentNames

Character vector of current column names

newNames

Character vector of new column names

Value

A tibble

Creation notes

First created in 2020-12-11 while working in the MARC-KC/CovidDataEntry Repository

Examples

## Not run: 
names(iris)
names(renameByPairs(iris, 
                    currentNames = c("Petal.Length", "Petal.Width"),
                    newNames = c("pl", "pw")))

## End(Not run)



MARC-KC/marcR documentation built on June 2, 2022, 9:31 p.m.