segment.string {cultevo} | R Documentation |
Split strings into their constituent segments.
Description
Split strings into their constituent segments (and count them).
Usage
segment.string(x, split = NULL)
segment.counts(x, split = NULL)
Arguments
x |
one or more strings to be split (and, optionally, counted) |
split |
the boundary character or sequence at which to segment the
string(s). The default, |
Functions
-
segment.string
: Returns a list (of the same length asx
), each item a vector of character vectors. -
segment.counts
: Calculate the frequency of individual characters in one or more strings. Returns a matrix with one row for every string inx
.
Examples
segment.string(c("asd", "fghj"))
segment.string(c("la-dee-da", "lala-la"), "-")
segment.counts(c("asd", "aasd", "asdf"))
[Package cultevo version 1.0.2 Index]