| caseconverter {snakecase} | R Documentation |
Wrappers around to_any_case()
to_snake_case(string, abbreviations = NULL, sep_in = NULL, parsing_option = 1, transliterations = NULL, sep_out = NULL, unique_sep = NULL, empty_fill = NULL, prefix = "", postfix = "") to_lower_camel_case(string, abbreviations = NULL, sep_in = NULL, parsing_option = 1, transliterations = NULL, sep_out = NULL, unique_sep = NULL, empty_fill = NULL, prefix = "", postfix = "") to_upper_camel_case(string, abbreviations = NULL, sep_in = NULL, parsing_option = 1, transliterations = NULL, sep_out = NULL, unique_sep = NULL, empty_fill = NULL, prefix = "", postfix = "") to_screaming_snake_case(string, abbreviations = NULL, sep_in = NULL, parsing_option = 1, transliterations = NULL, sep_out = NULL, unique_sep = NULL, empty_fill = NULL, prefix = "", postfix = "") to_parsed_case(string, abbreviations = NULL, sep_in = NULL, parsing_option = 1, transliterations = NULL, sep_out = NULL, unique_sep = NULL, empty_fill = NULL, prefix = "", postfix = "") to_mixed_case(string, abbreviations = NULL, sep_in = NULL, parsing_option = 1, transliterations = NULL, sep_out = NULL, unique_sep = NULL, empty_fill = NULL, prefix = "", postfix = "") to_lower_upper_case(string, abbreviations = NULL, sep_in = NULL, parsing_option = 1, transliterations = NULL, sep_out = NULL, unique_sep = NULL, empty_fill = NULL, prefix = "", postfix = "") to_upper_lower_case(string, abbreviations = NULL, sep_in = NULL, parsing_option = 1, transliterations = NULL, sep_out = NULL, unique_sep = NULL, empty_fill = NULL, prefix = "", postfix = "") to_swap_case(string, abbreviations = NULL, sep_in = NULL, parsing_option = 1, transliterations = NULL, sep_out = NULL, unique_sep = NULL, empty_fill = NULL, prefix = "", postfix = "")
string |
A string (for example names of a data frame). |
abbreviations |
character with (uppercase) abbreviations. This marks
abbreviations with an underscore behind (in front of the parsing).
Useful if |
sep_in |
(short for separator input) A regex supplied as a character (if not |
parsing_option |
An integer that will determine the parsing_option.
|
transliterations |
A character vector (if not You should use this feature with care in case of |
sep_out |
(short for separator output) String that will be used as separator. The defaults are |
unique_sep |
A string. If not |
empty_fill |
A string. If it is supplied, then each entry that matches "" will be replaced by the supplied string to this argument. |
prefix |
prefix (string). |
postfix |
postfix (string). |
A character vector according the specified parameters above.
A character vector according the specified target case.
caseconverters are vectorised over string, sep_in, sep_out,
empty_fill, prefix and postfix.
Malte Grosser, malte.grosser@gmail.com
Malte Grosser, malte.grosser@gmail.com
snakecase on github, to_any_case for flexible high level conversion and more examples.
strings <- c("this Is a Strange_string", "AND THIS ANOTHER_One", NA)
to_snake_case(strings)
to_lower_camel_case(strings)
to_upper_camel_case(strings)
to_screaming_snake_case(strings)
to_lower_upper_case(strings)
to_upper_lower_case(strings)
to_parsed_case(strings)
to_mixed_case(strings)
to_swap_case(strings)