Learn R Programming

emuR (version 1.0.0)

splitstring: Split a string into words.

Description

Splits a string into words.

Usage

splitstring(str, char)

Arguments

str

A string.

char

A character to split on

Value

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

Examples

Run this code
# NOT RUN {
splitstring("/home/recog/steve/foo", "/")
#[1] "home" "recog" "steve" "foo"

# }

Run the code above in your browser using DataLab