Aggregate ('dissolve') method for SpatialPolygons to merge polygons if the values of selected variables are the same.
Usage
## S3 method for class 'SpatialPolygons':
aggregate(x, vars=NULL, sums, ...)
Arguments
x
SpatialPolygons* object
vars
Character or integer. The variables (column names or numbers) that should be used to aggregate (dissolve) the SpatialPolygons by only maintaining unique combinations of these variables. The default setting is to use no variables and aggregate all polygons
sums
List with function(s) and variable(s) to summarize. This should be a list of lists in which each element of the main lists has two items. The first item is function (e.g. mean), the second element is a vector of column names (or indices) that need to summ