symdif | R Documentation |
Symetrical difference of SpatialPolygons* objects
## S4 method for signature 'SpatialPolygons,SpatialPolygons'
symdif(x, y, ...)
x |
SpatialPolygons* object |
y |
SpatialPolygons* object |
... |
Additional SpatialPolygons* object(s) |
SpatialPolygons*
erase
#SpatialPolygons
p <- shapefile(system.file("external/lux.shp", package="raster"))
b <- as(extent(6, 6.4, 49.75, 50), 'SpatialPolygons')
crs(b) <- crs(p)
sd <- symdif(p, b)
plot(sd, col='red')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.