Description Usage Arguments Value Author(s) References Examples
Calculates the area of a polygon
1 |
x |
a vector of coordinates OR a 2-column matrix of coordinates OR a data frame with columns 'x' and 'y' containing the coordinates. The last pair of coordinates need not be the same as the first pair. |
y |
if x is a vector, the corresponding vector of coordinates, otherwise NULL |
The area of the polygon. If the vertices are listed in anticlockwise order, the area will be negative.
Andy Royle, adapted (slightly) by Mike Meredith
Andy Royle's function from scrbook package
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.