[R-sig-Geo] NA raster replace

Alfredo Alessandrini alfreale74 at gmail.com
Tue May 10 16:21:03 CEST 2011


Hi,

I've to replace NA value with zero in some raster.

I use the raster package.

Is there a faster method than this:

funNA <- function(x) {x[is.na(x)] <- 0; return(x)}

test <- calc(test,funNA)




Alfredo



More information about the R-sig-Geo mailing list