Description Usage Arguments Value Note Author(s) Examples
View source: R/multi_strsplit.R
An adaptation of the strsplit function, which is only able to take a single character string for its split argument (when fixed = TRUE).
1 | multi_strsplit(x, splits)
|
x |
character vector, each element of which is to be split. Other inputs, including a factor, will give an error. |
splits |
character vector containing regular expressions to use for splitting. |
A character vector containing all characters in x that were split using splits.
Applies fixed = TRUE to underlying strsplit function. See strsplit documentation for explanation of this argument.
Will Haese-Hill
1 2 3 | x = c("a+b-c", "d*e/f")
multi_strsplit(x, splits=c('+', '-', '*', '/'))
# [1] "a" "b" "c" "d" "e" "f"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.