Skip to content
Prev 255544 / 398506 Next

Fisher's test

On 2011-04-01 10:19, Jim Silverton wrote:
apply(yourMatrix, 1, function(x) fisher.test(cbind(x, 100 - x)))

or, if you only want the P-value:

  apply(yourMatrix, 1,
        function(x) fisher.test(cbind(x, 100 - x))$p.value)

Peter Ehlers