This function removes some special characters (-/=* and space) from labels and replaces them with underscore _ for better handling with string functions and as column names in count tibbles.

clean_labels(df, col_names = NULL)

Arguments

df

Data frame with label columns

col_names

Column names of labels (string vector, default NULL)

Value

The cleaned data frame with unchanged column names

Details

if col_names is left as null then all columns with string data are cleaned.