tHANKS FOR ALL YOUR SUGGESTIONS
 
Kind Regards
Amit Patel

----- Original Message ----
From: Gregor Gorjanc <gregor.gorjanc@bfro.uni-lj.si>
To: r-help@stat.math.ethz.ch
Sent: Thursday, 6 December, 2007 12:06:00 AM
Subject: Re: [R] Dealing with NA's in a data matrix

Henrique Dallazuanna <wwwhsd <at> gmail.com> writes:
>  x[is.na(x)] <- 0
> 
> On 05/12/2007, Amit Patel <amitpatel_ak <at> yahoo.co.uk> wrote:
> > Hi I have a matrix with NA value that I would like to convert these
 to a
value of 0.
> > any suggestions

also

library(gdata)
x <- matrix(rnorm(16), nrow=4, ncol=4)
x[1, 1] <- NA
NAToUnknown(x, unknown=0)

Gregor

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.






      ___________________________________________________________

ttp://uk.promotions.yahoo.com/forgood/
	[[alternative HTML version deleted]]

