Skip to content
Prev 11814 / 29559 Next

raster: creating a layer of NA

Hi Agus,

That happens because I defined Arith functions for Raster* objects and
numeric values, but not for Raster* objects and logical values. NA is
a logical value, see class(NA). I will add that.

Here are two more work arounds:

r <- D10N2009[[1]] * as.numeric(NA)

r <- calc(D10N2009[[1]], fun=function(x) x * NA)

Robert
On Wed, May 25, 2011 at 3:41 AM, Lyndon Estes <lestes at princeton.edu> wrote: