Learn R Programming

tsensembler (version 0.1.0)

split_by: Splitting expressions by pattern

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

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

Run this code
# NOT RUN {
split_by_("time_series")
split_by.("time.series")
split_by("born2bewild", "2")

# }

Run the code above in your browser using DataLab