Description Usage Arguments Value Examples
Essentially a thin convenience wrapper around plyr::rename(x, list(...))
,
except qtag objects have their id.vars/tag.vars/measure.vars attributes properly modified.
1 2 3 4 5 6 7 8 9 | rename.cols(.data, ..., warn_missing = TRUE, warn_duplicated = TRUE)
## Default S3 method:
rename.cols(.data, ..., warn_missing = TRUE,
warn_duplicated = TRUE)
## S3 method for class 'qtag'
rename.cols(.data, ..., warn_missing = TRUE,
warn_duplicated = TRUE)
|
.data |
An object that has columns that can be renamed |
... |
Key/value pairs to replace in the form |
warn_missing |
Print a message if any old names are not actually present in x |
warn_duplicated |
Print a message if any name appears more than once in x after the operation. |
A copy of the modified object
1 2 3 4 5 | data(pocmaj)
rename.cols(pocmaj, Ca="Calcium")
pocmaj2 <- as.qtag(pocmaj, id.vars=c("core", "depth"))
pocmaj2 <- rename.cols(pocmaj2, Ca="Calcium")
attr(pocmaj2, "measure.vars")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.