areaPoly: Area of the polygons in SpatialPolygonsDataFrame

Description Usage Arguments Value Author(s) References Examples

View source: R/areaPoly.R

Description

Calculates the area of each polygon in SpatialPolygonsDataFrame.

Usage

1
areaPoly(sp.object=NULL) 

Arguments

sp.object

SpatialPolygonsDataFrame, must be a SpatialPolygonsDataFrame object.

Value

a numeric vector.

Author(s)

Zack W. Almquist

References

Zack W. Almquist (2010). US Census Spatial and Demographic Data in R: The UScensus2000 Suite of Packages. Journal of Statistical Software, 37(6), 1-31. http://www.jstatsoft.org/v37/i06/.

Also see: SpatialPolygonsDataFrame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
data(oregon.county10)



## Build density using areaPoly()
den00<-oregon.county10$P0010001/areaPoly(oregon.county10)
oregon.county10$den00<-den00

choropleth(oregon.county10,"den00",color = list(fun = "rainbow", 
attr = list(4)),main="2010 US Counties \n 
Oregon",type="plot",border="transparent")

## End(Not run)

zalmquist/UScensus2010 documentation built on May 28, 2017, 11:40 a.m.