aggregate: Aggregate polygons

Description Usage Arguments Value Author(s) See Also

Description

Aggregate ('dissolve') method for SpatialPolygons to merge polygons if the values of selected variables are the same.

Usage

1
2
## S4 method for signature '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. You can also supply a vector with a length of length(row.names(x))

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 summarize with that function. Be careful with character and factor variables (you can use, e.g. 'first' function(x)x[1] or 'last' function(x)x[length(x)] or modal for these variables

...

Additional arguments (none implemented)

Value

SpatialPolygons*

Author(s)

Robert J. Hijmans

See Also

disaggregate, union


geovec documentation built on May 2, 2019, 6:15 p.m.