rename: Rename object

View source: R/rename.R

renameR Documentation

Rename object

Description

This function finds old names and replace them with new ones.

Usage

rename(x, old, new)

Arguments

x

an object from which names can be extracted see names().

old

a vector of character strings of old names.

new

a vector of character strings of new names.

Examples

tb <- data.frame(var1 = 2, var2 = "B")
rename(tb, "var1", "uptake")
rename(tb, c("var1", "var2"), c("uptake", "type"))

letiR/letiRmisc documentation built on Sept. 11, 2022, 12:43 a.m.