ren_many | R Documentation |
Rename many columns using a named vector.
ren_many(data, ren, ignore_case = TRUE)
data |
Dataframe. |
ren |
Named character vector with c("new name" = "old name"). |
ignore_case |
Ignore case if |
Rename many columns using a named character vector where the names are the new name and the element the old name. See the example.
Dataframe with new names.
df <- iris df <- ren_many(df, ren = c("sepal.length" = "Sepal.Length", "flower" = "Species")) stopifnot(identical( names(df), c("sepal.length", "Sepal.Width", "Petal.Length", "Petal.Width", "flower") ))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.