## Create matrix interaction x tested matrix
interact <- c(1, 3, 2, 2, 6, 5, 2, 4, 1, 3)
tested <- c(3, 3, 5, 4, 8, 5, 3, 4, 2, 3)
mat <- cbind(interact, tested)
## Perform test
res <- hyperG(mat, 1000, 10000)
summary(res$P)
Run the code above in your browser using DataLab