bootstrap_readability: compute bootstrapped SEs for readability statistics

Description Usage Arguments Value Examples

View source: R/bootstrap_readability.R

Description

Function to compute bootstrapped mean and SEs for readability statistics. This is a wrapper around quanteda.textstats::textstat_readability(), that redraws the corpus using sentence-level bootstrapping from the original texts.

Usage

1
bootstrap_readability(x, n = 100, ..., verbose = FALSE)

Arguments

x

character or corpus input object for which readability will be computed

n

bootstrap replicates

...

additional arguments passed to quanteda.textstats::textstat_readability()

verbose

if TRUE show status messages

Value

list consisting of three data.frame objects: the computed values on the original texts; the computed mean of the replicates; and the standard deviations of the replicates

Examples

1
2
3
data(data_corpus_inaugural, package = "quanteda")
bootstrap_readability(data_corpus_inaugural[50:58], n = 10,
    measure = c("Flesch", "Flesch.Kincaid"), verbose = TRUE)

kbenoit/sophistication documentation built on May 12, 2021, 5:57 a.m.