explode {BBmisc}R Documentation

Split up a string into substrings.

Description

Split up a string into substrings according to a seperator.

Usage

explode(x, sep = " ")

Arguments

x

[character]
Source string.

sep

[character]
Seperator whcih is used to split x into substrings. Default is “ ”.

Value

[vector] Vector of substrings.

Examples

explode("foo bar")
## [1] "foo" "bar"
explode("comma,seperated,values", sep = ",")
## [1] "comma"     "seperated" "values"

[Package BBmisc version 1.7 Index]