dissolve: Aggregate shapes in a simple features data frame

View source: R/MazamaSpatialUtils.R

dissolveR Documentation

Aggregate shapes in a simple features data frame

Description

Aggregate shapes in a simple features dataframe. This is a convenience wrapper for ms_dissolve.

Usage

dissolve(SFDF, field = NULL, sum_fields = NULL, copy_fields = NULL, ...)

Arguments

SFDF

Object of class simple features data frame.

field

Name of the field to dissolve on.

sum_fields

Names of fields to sum.

copy_fields

Names of fields to copy. The first instance of each field will be copied to the aggregated feature

...

arguments passed to rmapshaper::ms_dissolve()

Value

A simple features dataframe with aggregated shapes.

Examples


regions <- dissolve(SimpleCountries, field = "UN_region", sum_fields = "area")
plot(regions)
dplyr::glimpse(regions)


MazamaSpatialUtils documentation built on Sept. 8, 2023, 5:22 p.m.