I know I can use raster::crop to crop a raster using a polygon shapefile which gives a raster with extracted values inside the polygons. But I would like to extract everything except the inside of the polygon - I mean I want to inverse the selection. How can I do this?

  • raster::mask has an 'inverse' argument, and might be what you are looking for. – humperderp Mar 27 at 11:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.