Learn R Programming

BBmisc (version 1.10)

explode: 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

Run this code
explode("foo bar")
explode("comma,seperated,values", sep = ",")

Run the code above in your browser using DataLab