Zero-configuration function that takes unwieldy column names and coerces them into tidyverse-styled column names.

clean_columns(x)

Arguments

x

A vector of column names.

Value

A character vector of column names.

Examples

clean_columns(c("Date of Purchase", "Item No.", "description", "",
  "Transaction at Jane's Counter?", "Auditing - Worth it?"))
#> [1] "date_of_purchase"             "item_no"                     
#> [3] "description"                  "column_4"                    
#> [5] "transaction_at_janes_counter" "auditing_worth_it"