Description Usage Arguments Value Author(s) See Also Examples
Symetrical difference of SpatialPolygons* objects
1 2 |
x |
SpatialPolygons* object |
y |
SpatialPolygons* object |
... |
Additional SpatialPolygons* object(s) |
SpatialPolygons*
Robert J. Hijmans
1 2 3 4 5 6 7 8 | #SpatialPolygons
if (require(rgdal) & require(rgeos)) {
p <- shapefile(system.file("external/lux.shp", package="raster"))
b <- as(extent(6, 6.4, 49.75, 50), 'SpatialPolygons')
projection(b) <- projection(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.