
Last chance! 50% off unlimited learning
Sale ends in
Split words.
split_word(x, ...)# S3 method for default
split_word(x, lower = TRUE, ...)
# S3 method for data.frame
split_word(x, text.var = TRUE, lower = TRUE, ...)
Returns a list of vectors of words or an expanded
data.table
with words split apart.
A data.frame
or character vector with words.
logical. If TRUE
the words are converted to lower case.
The name of the text variable. If TRUE
split_word
tries to detect the text column with words.
Ignored.
(x <- c(
"Mr. Brown comes! He says hello. i give him coffee.",
"I'll go at 5 p. m. eastern time. Or somewhere in between!",
"go there"
))
split_word(x)
split_word(x, lower=FALSE)
data(DATA)
split_word(DATA)
split_word(DATA, lower=FALSE)
## Larger data set
split_word(hamlet)
Run the code above in your browser using DataLab