[R] correlation
John Fox
jfox at mcmaster.ca
Thu Aug 22 05:57:26 CEST 2002
Dear Laurence,
At 06:21 PM 8/21/2002 -0700, you wrote:
>I have a file (a matrix) on which I have to compute the correlations.
>The function "cov" compute the correlations
>between the columns of a matrix, but I want to compute the correlations
>between the raws.
Actually, cov computes covariances; cor computes correlations
>Can somebody say to me how I can carry out that?
Just transpose the matrix, as in cor(t(x)).
I hope that this helps,
John
-----------------------------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario, Canada L8S 4M4
email: jfox at mcmaster.ca
phone: 905-525-9140x23604
web: www.socsci.mcmaster.ca/jfox
-----------------------------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list