subset.polylist

0th

Percentile

Subset polygon list objects

The function subsets a polygon list object, also subsetting region ID attributes and also map limits if required.

Keywords
spatial
Usage
subset.polylist(x, subset, fit.bbox = TRUE, ...)
Arguments
x
a polylist object
subset
a logical vector valued TRUE if the element is to be retained
fit.bbox
if TRUE (default) modifies the maplim attribute to bound the subset
...
other arguments passed through
Value

  • returns a polylist object, lists of polygon boundary coordinates (divided by NA where the polygon object is represented by more than one polygon);

Aliases
  • subset.polylist
Examples
nc <- read.shape(system.file("shapes/sids.shp", package = "maptools")[1])
mappolys <- Map2poly(nc, as.character(nc$att.data$FIPSNO))
submap <- subset(mappolys, nc$att.data$SID74 > 0)
plot(mappolys, col="orange")
plot(submap, add=TRUE, col="lightpink", forcefill=TRUE)
Documentation reproduced from package maptools, version 0.4-3, License: GPL version 2 or later (R and interface code), MIT (shapelib code)

Community examples

Looks like there are no examples yet.