[R] Is there any Command showing correlation of all variables in a dataset?

2011-03-01 Thread JoonGi
Thanks in advance. I want to derive correlations of variables in a dataset Specifically library(Ecdat) data(Housing) attach(Housing) cor(lotsize, bathrooms) this code results only the correlationship between two variables. But I want to examine all the combinations of variables in this

Re: [R] Is there any Command showing correlation of all variables in a dataset?

2011-03-01 Thread Mike Marchywka
Date: Tue, 1 Mar 2011 02:41:00 -0800 From: joo...@hanmail.net To: r-help@r-project.org Subject: [R] Is there any Command showing correlation of all variables in a dataset? Thanks in advance. I want to derive correlations of variables

Re: [R] Is there any Command showing correlation of all variables in a dataset?

2011-03-01 Thread rex.dwyer
?cor answers that question. If Housing is a dataframe, cor(Housing) should do it. Surprisingly, ??correlation doesn't point you to ?cor. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of JoonGi Sent: Tuesday, March 01, 2011 5:41

Re: [R] Is there any Command showing correlation of all variables in a dataset?

2011-03-01 Thread Scott Chamberlain
cor.prob function gives matrix of correlation coefficients and p-values together ### Function for calculating correlation matrix, corrs below diagonal, ### and P-values above diagonal cor.prob - function(X, dfr = nrow(X) - 2) { R - cor(X) above - row(R) col(R) r2 - R[above]^2 Fstat -

Re: [R] Is there any Command showing correlation of all variables in a dataset?

2011-03-01 Thread Liviu Andronic
On Tue, Mar 1, 2011 at 11:41 AM, JoonGi joo...@hanmail.net wrote: Thanks in advance. I want to derive correlations of variables in a dataset Specifically library(Ecdat) data(Housing) attach(Housing) cor(lotsize, bathrooms) this code results only the correlationship between two