[R] Where to find the p-value of a correlation test

Duncan Murdoch murdoch.duncan at gmail.com
Wed Apr 25 15:43:26 CEST 2012


On 12-04-25 9:30 AM, Aaditya Nanduri wrote:
> Hey everyone,
>
>
> I hope this finds you in good cheer.
>
> I just have a quick question: What is the function that outputs the p-value
> for correlation?
>
> cor(x,y) only provides the R value. I would like the p-value associated
> with it.

cor(x,y) calculates the correlation, it doesn't perform a test, so there 
is no p-value.

cor.test() performs a test.

Duncan Murdoch



More information about the R-help mailing list