Learn R Programming

filesstrings (version 1.0.0)

SplitCamelCase: Split a string based on camelcase

Description

Vectorised over string.

Usage

SplitCamelCase(string, lower = FALSE)

Arguments

string

A character vector.

lower

Do you want the output to be all lower case (or as is)?

Value

A list of character vectors, one list element for each element of string.

References

Adapted from Ramnath Vaidyanathan's answer at http://stackoverflow.com/questions/8406974/splitting-camelcase-in-r.

Examples

Run this code
SplitCamelCase(c("RoryNolan", "NaomiFlagg", "DepartmentOfSillyHats"))

Run the code above in your browser using DataLab