This function fixes the column names of a given object so that all words
are spaced by a specified delimiter, and any special characters are replaced
according to a substitution map.
A character string containing a regex pattern
for invalid characters to replace. Default is "( )|(\()|(\))|(\.)|(/)".
spacing
A character string to replace invalid characters with. Default
is "_".
subMap
A named list where the names are regular expressions and the
values are the replacement strings. These substitutions are applied before
.subMap.
.subMap
A named list where the names are regular expressions and the
values are the replacement strings. These substitutions are applied after
subMap. Default is list("\+" = "plus").
unique
A logical indicating whether to ensure unique column names by
appending a suffix if necessary. Default is FALSE.