R/dataprep.R
remove_non_ascii_from_df.Rd
This function removes all non-ASCII characters from a data.frame. This is particularly useful in non-English locales when special characters pose problems (e.g. when using the machine learning library h2o).
remove_non_ascii_from_df(df)
data.frame
df with non-ASCII characters removed
df
base::iconv()
df <- df |> remove_non_ascii_from_df() #> [1] "Removed non-ascii characters from column names and entire df"