Learn R Programming

latticeDensity (version 1.2.7)

areaRegion: Computes area of a region

Description

This function computes the area of a region by first finding the area of the bounding polygon, then subtracting the area of each hole.

Usage

areaRegion(formLatticeOutput)

Value

Numeric The area of the bounded region.

Arguments

formLatticeOutput

An object returned by formLattice or editLattice.

Warning

Note that this program does not check to see if the holes are non-intersecting or if the holes intersect the polygon.

Examples

Run this code
data(areaRegionExample)
attach(areaRegionExample)
hole_list <- list(hole1,hole2)
nodeFillingOutput <- nodeFilling(poly=boundary, node_spacing=0.03,
                               hole_list = hole_list)
formLatticeOutput <- formLattice(nodeFillingOutput)
plot(formLatticeOutput)
areaRegion(formLatticeOutput)

Run the code above in your browser using DataLab