Skip to contents

Format columns of a dataset by removing capital letters, bracket and transform white space as underscore

Usage

format_col(col_names)

Arguments

col_names

A vector of character containing column names to be formatted

Value

The input correctly formatted

Examples

# format several vectors of characters
format_col(c("lkjez alzkj", "kjfe[lkjz]", "lkjee [lkj]"))
#> [1] "lkjezalzkj" "kjfe_lkjz"  "lkjee_lkj"