>From the help for cor (from the stats package):

"If x and y are matrices then the covariances (or correlations) between the
columns of x and the columns of y are computed."

So if you make a matrix with each column corresponding to one of your
variables, you can get what you're after.

For future reference, help.search("correlation") turns up the proper page as
the first suggestion.

Hope this helps,

Matt Wiener

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jessica Higgs
Sent: Monday, February 07, 2005 10:58 AM
To: R-help@stat.math.ethz.ch
Subject: [R] Creating a correlation Matrix


Hi all:

I have a question on how to go about creating a correlation matrix.  I have 
a huge amount of data....21 variables for 3471 times. I want to see how 
each of the variables correlate to each other.  Any help would be 
appreciated, including which package and which functions I should use to do 
this.

Thanks,
Jessica Higgs

Masters Student
Department of Meteorology
Penn State University

______________________________________________
R-help@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@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

Reply via email to