maps (version 2.0-9)

area.map: Area of map regions

Description

Computes the areas of regions in a map.

Usage

area.map(m, regions = ".", ...)

Arguments

m
a map object containing named polygons (created with fill = TRUE).
regions
a character vector naming one of more regions, as in map.
...
additional arguments to match.map

Value

  • a named vector of region areas.

Details

The area of each matching region in the map is computed, and regions which match the same element of regions have their areas combined.

See Also

area.polygon, apply.polygon

Examples

Run this code
m = map("state", fill = TRUE)
area.map(m)
area.map(m, ".*dakota")
area.map(m, c("North Dakota", "South Dakota"))

Run the code above in your browser using DataCamp Workspace