Skip to content
Back to formatted view

Raw Message

Message-ID: <20807696.post@talk.nabble.com>
Date: 2008-12-03T06:50:02Z
From: Dieter Menne
Subject: Null values In R.
In-Reply-To: <a193e6ca0812022033v41ebbc87u4b71528bbe8f6725@mail.gmail.com>

paul murima wrote:
> 
> 
> My problem is largely when i attempt to use correlation for my data...
> xcc <- cor(a);
> 
> The  error i get is as follows
> 
> Error in cor(a) : missing observations in cov/cor
> 

As Daniel suggested, it is always best to use the function's parameter to
handle NULLs. In other cases, it could help to do 

a <- na.omit(a)

but be careful: this may throw away to many rows when you have more than 2
columns.

Dieter


-- 
View this message in context: http://www.nabble.com/Null-values-In-R.-tp20806622p20807696.html
Sent from the R help mailing list archive at Nabble.com.