splitin: A more practical version of base R's strsplit function.

Description Usage Arguments Examples

View source: R/comfy-functions.R

Description

Splits a string, or a vector of strings, and returns the unlisted result.

Usage

1
splitin(string, split_by = "[^[:alnum:]]+")

Arguments

string

The string to be split. Can be a single string or a vector of strings.

split_by

The separator on which to split the string. Defaults to any non-alphanumeric.

Examples

1
2
3
4
splitin("this is my string")
splitin("this/is.my-string")
my_strings <- c("This is my first string", "this.is/my--second*string")
splitin(my_strings)

tomathon-io/comfy documentation built on June 20, 2020, 1 a.m.