Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

compute_mattr

Compute the Moving-Average Type-Token Ratio (MATTR)


Description

From a tokens object, computes the Moving-Average Type-Token Ratio (MATTR) from Covington & McFall (2010), averaging all of the sequential moving windows of tokens of size MATTR_window across the text, returning the average as the MATTR.

Usage

compute_mattr(x, MATTR_window = 100L)

Arguments

x

a tokens object

MATTR_window

integer; the size of the moving window for computation of TTR, between 1 and the number of tokens of the document


quanteda.textstats

Textual Statistics for the Quantitative Analysis of Textual Data

v0.94.1
GPL-3
Authors
Kenneth Benoit [cre, aut, cph] (<https://orcid.org/0000-0002-0797-564X>), Kohei Watanabe [aut] (<https://orcid.org/0000-0001-6519-5265>), Haiyan Wang [aut] (<https://orcid.org/0000-0003-4992-4311>), Jiong Wei Lua [aut], Jouni Kuha [aut] (<https://orcid.org/0000-0002-1156-8465>), European Research Council [fnd] (ERC-2011-StG 283794-QUANTESS)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.