Pearson's Chi-squared Test for Count Data in the R documentation (source code)

= Pearson's Chi-squared Test for Count Data in the R documentation
{c}

Official documentation for `stats::chisq.test`. It distinguishes asymptotic <chi-squared distribution> calibration from <Monte Carlo tests>, and explains fixed-margin sampling for simulated <contingency table> tests. A finite simulation has limited <p-value> resolution.

https://stat.ethz.ch/R-manual/R-patched/library/stats/html/chisq.test.html