plus: Rename Plus Group Column

View source: R/plus.R

plusR Documentation

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)

Arguments

x

a data frame.

Value

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

Note

If the last column name already ends with a "+", the original data frame is returned without modifications.

See Also

names is the underlying function to rename columns.

TAF-package gives an overview of the package.

Examples

catage <- catage.taf

# Rename last column
catage <- plus(catage)

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


TAF documentation built on March 31, 2023, 6:51 p.m.