[R-sig-Geo] replace NA value error

Robert Hijmans r.hijmans at gmail.com
Fri Jul 29 16:15:57 CEST 2011


> I'm trying to replace NA value with 0. But the function replace all 
> the value with zero: 
> dem[is.na(dem[])] <- 0 

Alfredo, that is indeed incorrect; fixed in version 1.9-5. Another way to do
this also works in 1.9-2:

dem[is.na(dem)] <- 0 
 
Thanks, Robert


--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/replace-NA-value-error-tp6633025p6633712.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list