fix_special_characters_in_data {fixr}R Documentation

Remove Non-Alphanumeric Characters from Data Frame

Description

This function removes non-alphanumeric characters from all non-numeric columns in a data frame. The columns are modified in-place.

Usage

fix_special_characters_in_data(df)

Arguments

df

A data frame.

Value

A modified data frame where all non-numeric columns have had non-alphanumeric characters removed.

Examples

df <- data.frame(a = c("A*B", "C&D"), b = c("1.2", "3.4"))
fix_special_characters_in_data(df)
# Output:
#   a    b
# 1 AB  1.2
# 2 CD  3.4


[Package fixr version 0.1.0 Index]