Learn R Programming

wordcountaddin (version 0.3.0.9000)

text_stats: Get text stats for selected text (excluding code chunks and inline code)

Description

Call this addin to get a word count and some other stats about the text

Get a word count as a single integer

Get readability stats for selected text (excluding code chunks)

Get text stats for selected text (excluding code chunks and inline code)

Get readability stats for selected text (excluding code chunks)

Usage

text_stats(filename = this_filename())

word_count(filename = this_filename())

readability(filename = this_filename(), quiet = TRUE)

text_stats_chr(text)

readability_chr(text, quiet = TRUE)

text_stats_fn_(text)

Arguments

filename

Path to the file on which to compute text stats. Default is the current file (when working in RStudio) or the file being knit (when compiling with knitr).

quiet

Logical. Should task be performed quietly?

text

a character string of text, length of one

Details

Call this addin to get readbility stats about the text

Use this function with a character string as input

Use this function with a character string as input

Examples

Run this code
# NOT RUN {
md <- system.file(package = "wordcountaddin", "NEWS.md")
text_stats(md)
word_count(md)
# }
# NOT RUN {
readability(md)
# }

Run the code above in your browser using DataLab