extractWord | R Documentation |
Function to extract a vector of the n-th word by location from a vector of character strings.
extractWord(x, which = 1, split = " ")
x |
|
which |
|
split |
|
Uses strsplit(x,split,fixed=TRUE)
to split each character
string in x into a list of vectors of 'words', then extracts the n-th word
from each list element (where n is the input value of which
). If a
list element has less than which
words, the associated value in the
returned vector will be "".
a vector of words extracted bby location from x (of length(x))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.