Learn R Programming

geomander (version 2.3.0)

geo_trim: Trim Away Small Pieces

Description

Trim Away Small Pieces

Usage

geo_trim(from, to, thresh = 0.01, bool = FALSE, epsg = 3857)

Value

sf data frame or logical vector if bool=TRUE

Arguments

from

Required. sf dataframe. the geography to subset

to

Required. sf dataframe. the geography that from must intersect

thresh

Percent as decimal of an area to trim away. Default is .01, which is 1%.

bool

Optional, defaults to FALSE. Should this just return a logical vector?

epsg

numeric EPSG code to planarize to. Default is 3857.

Examples

Run this code
if (FALSE) {
# Needs Census Bureau API
data(towns)
block <- create_block_table('NY', 'Rockland')
geo_trim(block, towns, thresh = 0.05)
}

data(towns)
data(rockland)
sub <- geo_filter(rockland, towns)
rem <- geo_trim(sub, towns, thresh = 0.05)

Run the code above in your browser using DataLab