Unlimited learning, half price | 50% off
Get 50% off unlimited learning

sf (version 0.3-1)

aggregate.sf: aggregate an sf object

Description

aggregate an sf object, possibly union-ing geometries

Usage

"aggregate"(x, by, FUN, ..., union = FALSE)

Arguments

x
object of class sf
by
integer or factor, the same length as the number of rows in x, with groups to aggregate by (aggregation predicate)
FUN
function passed on to aggregate, in case ids was specified and attributes need to be grouped
...
arguments passed on to FUN
union
logical; should grouped geometries be unioned using st_union?

Value

an sf object with aggregated attributes and geometries, with an additional grouping variable called Group.1.