symdif function

Symetrical difference

Symetrical difference

Symetrical difference of SpatialPolygons* objects methods

## S4 method for signature 'SpatialPolygons,SpatialPolygons' symdif(x, y, ...)

Arguments

  • x: SpatialPolygons* object
  • y: SpatialPolygons* object
  • ...: Additional SpatialPolygons* object(s)

Returns

SpatialPolygons*

See Also

erase

Examples

#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')
  • Maintainer: Robert J. Hijmans
  • License: GPL (>= 3)
  • Last published: 2025-03-28