Douglas Bates wrote:
> On 7/3/05, Nuno Soares <[EMAIL PROTECTED]> wrote: > >>Hi everyone, >> >>I've been trying to find a function that outputs the Pearson and/or Spearman >>correlation coefficients for several variables with the associated >>statistics in one single table/matrix. For what I've been able to understand >>the Stats package is only able to compute these coeficients/statistics only >>in defined pairs. This becomes time consuming when we want to determine >>these measures with, say, 10 variables or more. Does anyone knows a solution >>to this? > > > I believe that the cor function already does what you want. Check > > ?cor > > and > > example(cor) > > If the first argument to cor is a matrix, it returns the correlation > matrix of all the columns. > > You can also try the rcorr function in the Hmisc package (or bundle or whatever it is called). It returns one matrix with correlation coefficients and one matrix with p-values. Ivar ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
