Introduction:
For t-tests, the following functions are used:
pwr.t.test(n = , d
= , sig.level = , power = , type = c("two.sample",
"one.sample", "paired"))
where n is the sample size, d is the effect size, and type indicates a
two-sample t-test, one-sample t-test or paired t-test. If you have unequal
sample sizes, use
pwr.t2n.test(n1 = , n2= , d = , sig.level =, power = )
where n1 and n2 are the sample sizes.
For t-tests, the effect size is assessed as

¦Ì1£ºmean of group1
¦Ì2 : mean of group1
¦Ò2 : common error variance
Cohen suggests that d values of 0.2, 0.5, and 0.8
represent small, medium, and large effect sizes respectively.
You can specify alternative="two.sided", "less", or "greater"
to indicate a two-tailed, or one-tailed test. A two tailed test is the default.