mat <- matrix(c(3,3,4,0,0, 1,2,0,4,3, 4,4,2,0,1, 4,4,3,0,0, 4,4,4,0,0),nrow=5,byrow=F) fisher.test(mat,simulate.p.value=T) mat