unlistStrsplit: Unlist the outcome of 'strsplit'

Description Usage Arguments Author(s) See Also Examples

Description

Per default, strsplit returns a list, with each entry holding the vector of splits of the initial string(s). This function is a simple wrapper that casts unlist upon the returned list to produce a concatenated character vector consisting of the single split elements.

Usage

1

Arguments

x

A character vector with elements to be split.

split

A character vector used for splitting, see strsplit.

...

Additional arguments passed to strsplit.

Author(s)

Florian Detsch

See Also

strsplit

Examples

1
2
3
4
5
6
7
## 1st example
x <- "This is a test."
unlistStrsplit(x, " ")

## 2nd example; note that 'split' defaults to 'whitespace'
x2 <- "This is a 2nd test."
unlistStrsplit(c(x, x2))

Orcs documentation built on May 2, 2019, 2:37 a.m.