cont.table {corpora} | R Documentation |
This is a convenience function which constructs contingency tables
needed for frequency comparisons with chisq.test
and
fisher.test
.
cont.table(k1, n1, k2, n2)
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) |
Because matrices cannot easily be vectorized, this function does not accept vector arguments and will abort with an error message in this case.
A numeric matrix containing the two-by-two contingency table for the frequency comparison.
Stefan Evert