Practice: Word Frequency
Split text and count with table.
Example
text <- "the cat and the hat and the bat"
w <- strsplit(text, " ")[[1]]
t <- sort(table(w), decreasing = TRUE)
print(t)
print(names(t)[1])Exercise
Count words.
(w)Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.