Thanks Robert! Exactly what I needed.
Best,
Alex
On Sat, Aug 30, 2014 at 6:31 PM, Robert J. Hijmans
wrote:
> Alex,
> Thanks for the clear example. I had not considered that case.
> I have added an argument 'updateNA' to the mask function (version
> 2.2-43) such that you can do:
>
> masked_imag
Alex,
Thanks for the clear example. I had not considered that case.
I have added an argument 'updateNA' to the mask function (version
2.2-43) such that you can do:
masked_image <- mask(img, msk, updatevalue=2, updateNA=TRUE)
That is, if updateNA is TRUE, NA cells outside the mask are also updated
I am using the mask function in the raster package (2.2-38) to mask out
areas within an image that are outside an area of interest (AOI). There are
NAs within this AOI that are meaningful - after masking the image I am
using freq to tabulate these NAs along with the other values in my AOI. For
this