Description Usage Arguments Details Value See Also Examples
rename columns (much different syntax than rename_at
).
All left hand sides are new column names and all right hand sides are old column names (
this allows swaps).
1 | rename_se(.data, mapping, splitTerms = TRUE, env = parent.frame())
|
.data |
data.frame |
mapping |
named character vector of columns to rename (new names on the left, original names on the right; this may seem reversed but it matches dplyr::rename()). |
splitTerms |
logical, if TRUE into separate renames (if FALSE instead, pass all at once to dplyr). |
env |
environment to work in. |
Note: this method as the default setting splitTerms = TRUE
, which is
safer (avoiding certain known dplyr
/dblyr
issues)
(please see the side-notes of https://winvector.github.io/FluidData/partition_mutate.html for some references).
.data with renamed columns
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.