Split a String Into Run Chunks

Usage

run_split(x)

Arguments

x
A string.

Value

Returns a list of vectors.

Description

Splits a string into a vector of runs.

Examples

run_split(c("122333444455555666666", NA, "abbcccddddeeeeeffffff"))
[[1]] [1] "1" "22" "333" "4444" "55555" "666666" [[2]] [1] NA [[3]] [1] "a" "bb" "ccc" "dddd" "eeeee" "ffffff"

See also

loc_split, split_vector

Author

Robert Reed and Tyler Rinker .