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

View source: R/hello.R

text_statsR Documentation

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

md <- system.file(package = "wordcountaddin", "NEWS.md")
text_stats(md)
word_count(md)
## Not run: 
readability(md)

## End(Not run)

benmarwick/wordcountaddin documentation built on March 18, 2024, 7:28 a.m.