Learn R Programming

BioGeoBEARS (version 0.2.1)

strsplit2: String splitting shortcut

Description

strsplit returns the results inside a list, which is annoying. strsplit2 shortens the process.

Usage

strsplit2(x, ...)

Arguments

x
A string to split
...
Other arguments to strsplit. The argument split is required.

Value

out The output from inside the list.

See Also

strsplit

Examples

Run this code
test=1

# strsplit returns the results inside a list element
out = strsplit("ABC", split="")
out
# I.e....
out[[1]]

# If this is annoying/ugly in the code, use strsplit2:
out = strsplit2("ABC", split="")
out

Run the code above in your browser using DataLab