# expected correlation is 0.20 and it is different from 0
# it could be 0.20 as well as -0.20
power.exact.onecor(rho = 0.20,
power = 0.80,
alpha = 0.05,
alternative = "two.sided")
# expected correlation is 0.20 and it is greater than 0
power.exact.onecor(rho = 0.20,
power = 0.80,
alpha = 0.05,
alternative = "one.sided")
Run the code above in your browser using DataLab