search for: worddf

Displaying 2 results from an estimated 2 matches for "worddf".

Did you mean: word
2010 Nov 01
1
spliting first 10 words in a string
Hi all, I have a columnn with text that has quite a few words in it. I would like to split these words in separate columns, but just first ten words in the string. Is that possible in R? Thank you, m [[alternative HTML version deleted]]
2010 Nov 02
1
splitting First 10 words in a string
..."quite" "a" Or if in a dataframe: words <-c("I have a columnn with text that has quite a few words in it.", "I would like to split these words in separate columns", "but just first ten words in the string. Is that possible in R?") worddf <- data.frame(words=words) t(sapply(strsplit(worddf$words, " "), "[", 1:10) ) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [, 8] [,9] [,10] [1,] "I" "have" "a" "columnn" "with" &quot...