Aggregate shapes in a spatial polygons dataframe. This is a convenience wrapper for rmapshaper::ms_dissolve()
rmapshaper::ms_dissolve()
dissolve(SPDF, field = NULL, sum_fields = NULL, copy_fields = NULL, ...)
object of class SpatialPolygonsDataFrame
proportion of points to retain (0-1; default 0.05)
fields to sum
fields to copy. The first instance of each field will be copied to the aggregated feature
arguments passed to rmapshaper::ms_dissolve()
A spatial polygons dataframe with aggregated shapes.
# NOT RUN { regions <- dissolve(SimpleCountries, field = "UN_region", sum_fields = "area") plot(regions) regions@data # }
Run the code above in your browser using DataLab