cont.table {corpora}R Documentation

Build contingency table for frequency comparison (corpora)

Description

This is a convenience function which constructs contingency tables needed for frequency comparisons with chisq.test and fisher.test.

Usage


cont.table(k1, n1, k2, n2)

Arguments

k1 frequency of a type in the first corpus
n1 the size of the first corpus (sample size)
k2 frequency of the type in the second corpus
n2 the size of the second corpus (sample size)

Details

Because matrices cannot easily be vectorized, this function does not accept vector arguments and will abort with an error message in this case.

Value

A numeric matrix containing the two-by-two contingency table for the frequency comparison.

Author(s)

Stefan Evert

See Also

chisq.test, fisher.test


[Package corpora version 0.3-2.1 Index]