Count words, sentences, and characters in input texts. These functions use
the stringi package, so they handle the counting of Unicode strings
(e.g., characters with diacritical marks) in a way that makes sense to people
counting characters.
count_words(x)
count_characters(x)
count_sentences(x)An integer vector containing the counted elements. If the input vector or list has names, they will be preserved.
count_words(mobydick)
#> mobydick
#> 219415
count_sentences(mobydick)
#> mobydick
#> 29076
count_characters(mobydick)
#> mobydick
#> 1235185