Number of Points in Each Polygon

Description

Given a set of polygons, returns the label point for each polygon in a SpatialPoints object.

Usage

1
poly.labels(polys)

Arguments

polys

A SpatialPolygons or SpatialPolygonsDataFrame object.

Value

SpatialPoints object containing the label point for each polygon.

Author(s)

Chris Brunsdon

Examples

1
2
3
4
5
6
# Data for New Haven to use in example
data(newhaven)
# How many breaches of peace in each census block?
n.breach = poly.counts(breach,blocks)
# Compute densities and map them
choropleth(blocks,n.breach/blocks$AREA)