powered by
Split strings into their constituent segments (and count them).
segment.string(x, split = NULL)segment.counts(x, split = NULL)
segment.counts(x, split = NULL)
one or more strings to be split (and, optionally, counted)
the boundary character or sequence at which to segment the string(s). The default, NULL, splits the string after every character.
NULL
segment.string: Returns a list (of the same length as x), each item a vector of character vectors.
segment.string
x
segment.counts: Calculate the frequency of individual characters in one or more strings. Returns a matrix with one row for every string in x.
segment.counts
# NOT RUN { segment.string(c("asd", "fghj")) segment.string(c("la-dee-da", "lala-la"), "-") segment.counts(c("asd", "aasd", "asdf")) # }
Run the code above in your browser using DataLab