x = matrix( c( 10 , 20 , 30 , 40 ) , nrow = 2 , ncol = 2 ) chisq.test( x , correct = TRUE , simulate.p.value = TRUE ) chisq.test( x , correct = TRUE , simulate.p.value = FALSE ) fisher.test( x , hybrid = FALSE , simulate.p.value = TRUE ) fisher.test( x , hybrid = FALSE , simulate.p.value = FALSE ) x = matrix( c( 4 , 5 , 10 , 0 ) , nrow = 2 , ncol = 2 ) x = cbind( c( 30 , 21 , 34 , 89 ) , c( 14 , 12 , 15 , 45 ) , c( 28 , 24 ,32 , 78 ) ) x = cbind( c( 30 , 21 , 34 , 89 ) , c( 5 , 4 , 6 , 15 ) , c( 10 , 24 , 24 , 0 ) )