[R] cor vs cor.test

Liaw, Andy andy_liaw at merck.com
Thu May 26 00:26:53 CEST 2005


A while ago I posted a function that computes p-values for a correlation
matrix, by adapting code in cor.test().  Search the archive for it.  Also
see rcorr() in the Hmisc package.  That might do what you want.

Andy


> From: Suresh Krishna
> 
> From:
> 
> ?cor.test
> 
> Arguments:
> 
>      x, y: numeric vectors of data values.  'x' and 'y' must have the
>            same length.
> 
> -s.
> 
> Michael Grant wrote:
> > 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
> > 
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> >
> 
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
> 
>




More information about the R-help mailing list