Learn R Programming

emuR (version 2.5.0)

splitstring: Split a string into words.

Description

Splits a string into words.

Usage

splitstring(str, char)

Value

A vector of strings. The original str is split at ever occurrence of char to generate a vector of strings.

Arguments

str

A string.

char

A character to split on

Examples

Run this code

splitstring("/home/recog/steve/foo", "/")
#[1] "home" "recog" "steve" "foo"

Run the code above in your browser using DataLab