View source: R/clearning-helpers.R
col_nms_rm_splchar | R Documentation |
Remove special characters from column names in a data frame. To be precise, the function
is implemented such that only the character class of numbers and letters in the current locale,
i.e., [:alnum:]
is retained.
col_nms_rm_splchar(df)
df |
A data frame or tibble. |
A data frame or tibble.
rm_spl_char()
for removing special characters from selected columns.
# Remove special characters from column names new_df <- df %>% col_nms_rm_splchar()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.