Skip to content

cor vs cor.test

2 messages · Michael Grant, Suresh Krishna

#
Using Windows System, R 2.1.0

d is a data frame, 48 rows, 10 columns
cor(d) works properly providing all pairwise Pearson correlation
coefficients among columns
cor.test(d) gives error message "Error in cor.test.default(d) : argument
"y" is missing, with no default"

Why?

Thanks,
MCG
#
From:

?cor.test

Arguments:

     x, y: numeric vectors of data values.  'x' and 'y' must have the
           same length.

-s.
Michael Grant wrote: