Learn R Programming

icesTAF (version 3.6.0)

plus: Rename Plus Group Column

Description

Rename the last column in a data frame, by appending a "+" character. This is useful if the last column is a plus group.

Usage

plus(x)

Value

A data frame similar to x, after renaming the last column.

Arguments

x

a data frame.

See Also

names is the underlying function to rename columns.

icesTAF-package gives an overview of the package.

Examples

Run this code
catage <- catage.taf

# Rename last column
catage <- plus(catage)

# Shorter and less error-prone than
names(catage)[names(catage)=="4"] <- "4+"

Run the code above in your browser using DataLab