plus {TAF} | R 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+"
[Package TAF version 4.2.0 Index]