An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-help/attachments/20071205/24a04fa4/attachment.pl
Dealing with NA's in a data matrix
3 messages · Amit Patel, Henrique Dallazuanna, Gregor Gorjanc
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 Kind Regards Amit Patel
___________________________________________________________
ttp://uk.promotions.yahoo.com/forgood/
[[alternative HTML version deleted]]
______________________________________________
R-help at 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.
Henrique Dallazuanna Curitiba-Paran?-Brasil 25? 25' 40" S 49? 16' 22" O
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