# R: Contingency tables

### From MathWiki

[edit]

## R tools for the analysis of contingency tables

- chisq.test
- Test equal p's if x is vector, independence if a matrix, = to given p. Can simulate p-value.

- prop.test
- prop.test can be used for testing the null that the proportions (probabilities of success) in several groups are the same, or that they equal certain given values.

prop.test(x, n, p = NULL, alternative = c("two.sided", "less", "greater"), conf.level = 0.95, correct = TRUE)