R/code_writing.R
create_varname.Rd
Convert a given string to a valid R variable name, converting spaces to underscores (_) instead of dots.
create_varname(x)
a string to convert
a string, which is also a valid variable name
Tom Elliott
create_varname("a new variable") #> [1] "a_new_variable" create_varname("8d4-2q5") #> [1] "X8d4.2q5"