col_nms_rm_splchar: Remove special characters from column names

View source: R/clearning-helpers.R

col_nms_rm_splcharR Documentation

Remove special characters from column names

Description

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.

Usage

col_nms_rm_splchar(df)

Arguments

df

A data frame or tibble.

Value

A data frame or tibble.

See Also

rm_spl_char() for removing special characters from selected columns.

Examples


# Remove special characters from column names
new_df <- df %>% col_nms_rm_splchar()


YangWu1227/citizenr documentation built on June 18, 2022, 12:17 p.m.