power.fisher.test(p1, p2, n1, n2, alpha=0.05, nsim=100)
p1
equals p2
against the alternative that they are not equal.fisher.test
, power.t.test
power.fisher.test(0.5,0.9,20,20) # 70% chance of detecting difference
Run the code above in your browser using DataLab