splitCamel | R Documentation |
This function splits strings formatted in camelCase or PascalCase into their component words. It can handle words where uppercase letters transition to lowercase letters, and it is capable of handling strings with sequences of uppercase letters followed by lowercase letters, effectively separating acronyms from camelCase beginnings.
splitCamel(x, conseq = TRUE)
splitPascal(x, conseq = TRUE)
x |
A character vector containing CamelCase or PascalCase strings to be split. |
conseq |
Logical indicating whether consecutive uppercase letters should be treated as part of the previous word (TRUE) or as separate words (FALSE). Default is TRUE. |
A list of character vectors, each containing the parts of the
corresponding CamelCase or PascalCase string split at the appropriate
transitions. If conseq
is FALSE, acronyms followed by words are
separated.
<stackoverflow.com/questions/8406974/splitting-camelcase-in-r>
splitCamel("splitCamelCaseIntoWords")
splitCamel(c("fooBar", "FOOBar", "anotherFOOBarTest"), conseq = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.