Power and Sample Size for Comparing Proportions
When outcomes are binary, two-group comparison is based on proportions rather than means. Power and sample size calculations then depend on $p_1$, $p_2$, the allocation scheme, and the chosen significance level.
This is the binary-outcome analogue of the continuous-outcome sample-size problem.
R
power.prop.test(p1 = 0.20, p2 = 0.28,
sig.level = 0.05,
power = 0.80)