areaPoly: Area of the polygons in SpatialPolygonsDataFrame

Description Usage Arguments Value Author(s) References Examples

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)

UScensus2010 documentation built on May 2, 2019, 5:13 p.m.