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
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
?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
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 -
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
5 matches
Mail list logo