Skip to content
Prev 21595 / 29559 Next

Unexpected behavior of raster "mask" function

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.

Robert


On Fri, Jul 18, 2014 at 11:18 AM, Alex Zvoleff
<azvoleff at conservation.org> wrote:
Message-ID: <CANtt_hwx2gFhfa8k9Sp96mVB4JHaaOhiyqaMjtvEM5XdS1+5cg@mail.gmail.com>
In-Reply-To: <CACwzsXHyCH09+qsPdre8NmNxE3BjehOcyuOmkAhKPn7UpAgA1w@mail.gmail.com>