Learn R Programming

BBmisc (version 1.13)

explode: Split up a string into substrings.

Description

Split up a string into substrings according to a seperator.

Usage

explode(x, sep = " ")

Value

[vector] Vector of substrings.

Arguments

x

[character]
Source string.

sep

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

Examples

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

Run the code above in your browser using DataLab