Learn R Programming

koRpus (version 0.13-8)

spache: Readability: Spache Formula

Description

This is just a convenient wrapper function for readability.

Usage

spache(
  txt.file,
  word.list,
  parameters = c(asl = 0.121, dword = 0.082, const = 0.659),
  ...
)

Arguments

txt.file

Either an object of class kRp.text, a character vector which must be be a valid path to a file containing the text to be analyzed, or a list of text features. If the latter, calculation is done by readability.num.

word.list

A vector or matrix (with exactly one column) which defines familiar words. For valid results the short Dale-Chall list with 769 easy words should be used.

parameters

A numeric vector with named magic numbers, defining the relevant parameters for the index.

...

Further valid options for the main function, see readability for details.

Value

An object of class kRp.readability.

Details

Calculates the Spache Formula. In contrast to readability, which by default calculates all possible indices, this function will only calculate the index value.

By default the revised Spache formula is calculated. If parameters="old", the original parameters are used.

This formula doesn't need syllable count.

Examples

Run this code
# NOT RUN {
spache(tagged.text, word.list=spache.revised.wl)
# }

Run the code above in your browser using DataLab