Dear R forum,
I have a data frame
dat = data.frame(
ABC = c(25.28000732,48.33857234,19.8013245,10.68361461),
DEF = c(14.02722251,10.57985168,11.81890316,21.40171514),
GHI = c(1,1,1,1),
JKL = c(45.96423231,44.52986236,16.56514176,32.14545122),
MNO =
0.20207810 0.45645683 1.000
A.K.
From: Katherine Gobin katherine_go...@yahoo.com
To: r-help@r-project.org r-help@r-project.org
Cc:
Sent: Friday, June 14, 2013 10:03 AM
Subject: [R] Removing NA from matrix
Dear R forum,
I have a data frame
dat = data.frame(
ABC = c
Subject: Re: [R] Removing NA from matrix
HI,
Try:
dat1-dat[sapply(dat,function(x) length(unique(x)))1]
cor(dat1)
# ABC DEF JKL MNO
#ABC 1.000 -0.75600764 0.55245223 -0.2735585
#DEF -0.7560076 1. -0.06479082 0.2020781
#JKL 0.5524522 -0.06479082
On Jun 14, 2013, at 7:03 AM, Katherine Gobin wrote:
Dear R forum,
I have a data frame
dat = data.frame(
ABC = c(25.28000732,48.33857234,19.8013245,10.68361461),
DEF = c(14.02722251,10.57985168,11.81890316,21.40171514),
GHI = c(1,1,1,1),
JKL =
4 matches
Mail list logo