Assume we have different sample number n1 and n2. if we have different proportion of test hypothesis p1 and p2, the proportion power test can be vary depending on sample sizes. Built in function in R power.prop.test assumes equal sample size. Therefore, it can teach you how many sample you need to get to reach the power at that significance level, but it cannot handle unequal sample group case. According to the Quick R page http://www.statmethods.net/stats/power.html, the pwr package can handle this case. as you can see below, different sample size can be matter in power analysis and pwr package can deal with it.

power.prop.test(p1=0.15, p2=0.30, power=0.85, sig.level=0.05)
##
##      Two-sample comparison of proportions power calculation
##
##               n = 137.604
##              p1 = 0.15
##              p2 = 0.3
##       sig.level = 0.05
##           power = 0.85
##     alternative = two.sided
##
## NOTE: n is number in *each* group
library(pwr)
n1=138; n2=138
p1=0.15; p2=0.30
h = abs(2*asin(sqrt(p1))-2*asin(sqrt(p2))); h # Non-directional h, magnitude of difference
##  0.3638807
h2 <- ES.h(p1, p2);h2 # directional h, pwr.2p2n.test works either directional or non-directional h anyway
##  -0.3638807
pwr.2p2n.test(h, n1=n1, n2=n2, sig.level=0.05)
##
##      difference of proportion power calculation for binomial distribution (arcsine transformation)
##
##               h = 0.3638807
##              n1 = 138
##              n2 = 138
##       sig.level = 0.05
##           power = 0.8560313
##     alternative = two.sided
##
## NOTE: different sample sizes
n1=500; n2=50
pwr.2p2n.test(h, n1=n1, n2=n2, sig.level=0.05)
##
##      difference of proportion power calculation for binomial distribution (arcsine transformation)
##
##               h = 0.3638807
##              n1 = 500
##              n2 = 50
##       sig.level = 0.05
##           power = 0.6891114
##     alternative = two.sided
##
## NOTE: different sample sizes

## Note:

According to wikipedia https://en.wikipedia.org/wiki/Effect_size, an effect size is a quantitative measure of the strength of a phenomenon. When comparing two independent proportions in power analysis, we may use Cohen’s h as a measure of effect size as shown in https://en.wikipedia.org/wiki/Cohen%27s_h. Cohen’s h can be used to describe the difference between two proportions as “small”, “medium”, or “large”. In my example, h = 0.36 and this can be considered as small effective size between two independent proportions. A rule of thumb Cohen’s h is shown below

• h = 0.20: “small effect size”.
• h = 0.50: “medium effect size”.
• h = 0.80: “large effect size”.