split_str: Split elements of a string.

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Split the elements of a string x into substrings accroding to (fixed, no regex) matches of split.

Usage

1

Arguments

x

character vector, each element of which is to be split. Other inputs, including a factor, will give an error.

split

String to split x.

Details

This function is equivalent to strsplit(x, split, fixed = TRUE)[[1L]].

Value

A list of the same length as x, the i-th element of which contains the vector of splits of x[i].

Author(s)

Dominik Mueller

See Also

strsplit

Examples

1
2
x <- '2_3_4'
split_str(x, '_')

DominikMueller64/dmisc documentation built on May 6, 2019, 2:52 p.m.