[R] mask and reverse the selection

Rolf Turner rolf.turner at xtra.co.nz
Thu Jun 14 00:17:16 CEST 2012


This question apparently relates to the mask() function from the
"raster" package.  This should have been made clear.

You might find the function complement.owin() in the "spatstat"
package helpful.

     cheers,

         Rolf Turner

On 14/06/12 08:42, Celine wrote:
> Hi
>
> I need some help with the function mask I have a polygon and I want to
> extract data for all the world except for the polygon
> I write this code but it doesn't work, do you have any idea of the problem ?
> how can I do that ?
>
> worldmask=mask(invHS,hotspot,inverse=TRUE)
> worldmask=mask(invHS,hotspot,reverse=TRUE)
>
> Thanks a lot for your help,
>
> Céline
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/mask-and-reverse-the-selection-tp4633307.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list