strSplit | R Documentation |
funCode function is to obtain the source code of an R function
strSplit(
x,
split,
fixed = FALSE,
perl = FALSE,
useBytes = FALSE,
nameRow = FALSE
)
x |
character vector or factor, each element of which is to be split. |
split |
character vector (or object which can be coerced to such) containing regular expression(s) (unless fixed = TRUE) to use for splitting. If empty matches occur, in particular if split has length 0, x is split into single characters. If split has length greater than 1, it is re-cycled along x. |
fixed |
logical. If TRUE match split exactly, otherwise use regular expressions. Has priority over perl. |
perl |
logical. Should Perl-compatible regexps be used? |
useBytes |
logical. If TRUE the matching is done byte-by-byte rather than character-by-character, and inputs with marked encodings are not converted. This is forced (with a warning) if any input is found which is marked as "bytes" (see Encoding). |
nameRow |
logical. Give names to each row if x has names and nameRow TRUE. |
A matrix of splited characters
{
## Not run:
x = c(as = "asfef", qu = "qwerty", "yuiop[", "b", "stuff.blah.yech")
# split x on the letter e
strSplit(x, "e")
## End(Not run)
}
import stringr
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.