I have a list comprised of words.
> head(splitWords2) [[1]] [1] \"Some\" \"additional\" \"information\" \"that\" \"we\" \"would\"
Something like this:
wordlist <- list( c("the","and","it"), c("we","and","it") ) require(plyr); require(stringr) > ldply(wordlist, function(x) str_count(x, "we")) V1 V2 V3 1 0 0 0 2 1 0 0