rename_dt | R Documentation |
Rename one or more columns in the data.frame.
rename_dt(.data, ...)
rename_with_dt(.data, .fn, ...)
.data |
data.frame |
... |
statements of rename, e.g. 'sl = Sepal.Length' means the column named as "Sepal.Length" would be renamed to "sl" |
.fn |
A function used to transform the selected columns. Should return a character vector the same length as the input. |
data.table
rename
iris %>%
rename_dt(sl = Sepal.Length,sw = Sepal.Width) %>%
head()
iris %>% rename_with_dt(toupper)
iris %>% rename_with_dt(toupper,"^Pe")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.