The goal of mtest is to study contingency tables. It is related to Fisher's exact test and to Barnard's exact test. The main difference with Barnard's test is that the nuisance parameter is not estimated, but integrated over all possible values.
You can use devtools
to install from this repository:
install_github('vqf/mtest', build_vignettes = T)
You will be able to install the released version of mtest shortly from CRAN with:
install.packages("mtest")
This is a basic example which shows you how to solve a common problem:
library(mtest)
m.test(list(c(10, 7), c(11, 6)))
tailed.m.test(list(c(10, 7), c(11, 6)))