sf
objectaggregate an sf
object, possibly union-ing geometries
# S3 method for sf
aggregate(x, by, FUN, ..., do_union = TRUE, simplify = TRUE)
object of class sf
(see aggregate): a list of grouping elements, each as long as the variables in the data frame x. The elements are coerced to factors before use.
function passed on to aggregate, in case ids
was specified and attributes need to be grouped
arguments passed on to FUN
logical; should grouped geometries be unioned using st_union?
logical; see aggregate
an sf
object with aggregated attributes and geometries, with additional grouping variables having the names of names(ids)
or named Group.i
for ids[[i]]
; see the data.frame
method of aggregate.