Last chance! 50% off unlimited learning
Sale ends in
x
into words.text_to_words
splits a string of text x
(consisting of one or more character strings)
into a vector of its constituting words.
text_to_words(x)
A string of text (required), typically a character vector.
A character vector.
text_to_words
removes all (standard) punctuation marks
and empty spaces in the resulting parts,
before returning a vector of the remaining character symbols
(as the words).
Internally, text_to_words
uses strsplit
to
split strings.
text_to_sentences
for splitting text into a vector of sentences;
count_words
for counting the frequency of words;
strsplit
for splitting strings.
Other text objects and functions:
Umlaut
,
capitalize()
,
caseflip()
,
cclass
,
count_chars()
,
count_words()
,
l33t_rul35
,
metachar
,
read_ascii()
,
text_to_sentences()
,
transl33t()
# NOT RUN {
# Default:
x <- c("Hello!", "This is a 1st sentence.", "This is the 2nd sentence.", "The end.")
text_to_words(x)
# }
Run the code above in your browser using DataLab