clean_name | R Documentation |
Remove specified characters or patterns from column names of a data frame.
clean_name(df, strtoremove)
df |
A data frame. |
strtoremove |
A character or pattern to be removed from column names. |
A data frame with modified column names.
df <- data.frame(First.Name = c("John", "Jane"),
Last.Name = c("Doe", "Smith"))
clean_name(df, "\.")
# Output:
# FirstName LastName
# 1 John Doe
# 2 Jane Smith
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.