Description Usage Arguments Examples
A wrapper for ?strsplit that will split the your character vector and only return the first element of the resultant list. Useful for breaking up a character vector when you only want output type, instead of having the vector embedded in a list.
1 | splitstr2vec(x, split = " ")
|
x |
a character vector to split |
split |
input to ?strsplit |
1 2 3 | test <- 'Hello there world! I like cats and unicorns.'
strsplit2vec(test)
strsplit2vec(test)[2]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.