Description Usage Arguments Examples
This function changes your data frame column names or character vector elements according with a specified pattern. By default it fixes column names that have a "." used as words separator to "_".
1 | change_names(x, from = ".", to = "_")
|
x |
A data frame or vector |
from |
Character to replace. Defaults to "." |
to |
Character to apply Defaults to "_" |
1 2 3 4 5 6 7 8 9 10 | x <- c("Example.1", "Example.2", "Example/3")
change_names(x)
df <- data_frame(
"Example.1" = c(1, 2),
"Example.2" = c(1, 2),
"Example!3" = c(1, 2))
df %>%
change_names()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.