powered by
Break a string wherever you go from a numeric charachter to a non-numeric or vice-versa.
StrSplitByNums(string, decimals = FALSE, leading.decimals = FALSE, negs = FALSE)
A string.
Do you want to include the possibility of decimal numbers (TRUE) or not (FALSE, the default).
TRUE
FALSE
Do you want to allow a leading decimal point to be the start of a number?
Do you want to allow negative numbers? Note that double negatives are not handled here (see the examples).
StrSplitByNums(c("abc123def456.789gh", "a1b2c344")) StrSplitByNums("abc123def456.789gh", decimals = TRUE) StrSplitByNums("22")
Run the code above in your browser using DataLab