split_by: Splitting expressions by pattern

Description Usage Arguments Value Examples

View source: R/utils.R

Description

This is an utility function that can be used to split expressions. It is based on strsplit function. split_by is the general purpose splitter split_by_ splits expressions by \"_\" split_by. splits expressions by a dot

Usage

1
2
3
4
5
split_by(expr, split, unlist. = TRUE, ...)

split_by_(expr, ...)

split_by.(expr, ...)

Arguments

expr

character expression to split;

split

expression to split expr by;

unlist.

Logical. If TRUE, the splitted expr is unlisted;

...

Further parameters to pass to strsplit;

Value

a list or vector with a splitted expression

Examples

1
2
3
split_by_("time_series")
split_by.("time.series")
split_by("born2bewild", "2")

tsensembler documentation built on Oct. 27, 2020, 5:07 p.m.