Skip to content

Fisher's test

2 messages · Jim Silverton, Peter Ehlers

#
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