View source: R/fix_special_characters_in_names.R
fix_special_characters_in_names | R Documentation |
This function removes any non-alphanumeric characters from both the row and column names of a given data frame.
fix_special_characters_in_names(df)
df |
A data frame with non-alphanumeric characters in the column or row names. |
A data frame with all non-alphanumeric characters removed from the column and row names.
df <- data.frame("Col1!" = c(1, 2, 3), "Col2?" = c(4, 5, 6))
rownames(df) <- c("Row1@", "Row2#", "Row3$")
fix_special_characters_in_names(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.