On Tuesday 19 February 2008 (12:33:21), Alfonso Pérez Rodríguez wrote:
> Hello, I'm sure that this question is too simple, but, I'm begining with R
> and I'm not able to change the NA values in a matrix by 0 values, and it's
> necessary for my work, how can I do It? Thank you.

your.matrix[is.na(your.matrix)] <- 0

Best,

Martin

______________________________________________
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.

Reply via email to