Can someone help me with how to find the most frequently used two and three words in a text using R?
My text is...
text <- c(\"Th
We can split the words and use table to summarize the frequency:
words <- strsplit(text, "[ ,.\\(\\)\"]") sort(table(words, exclude = ""), decreasing = T)