Description Usage Arguments Value Examples
Calculate the area of a non-intersecting polygon given its vertices
1 2 3 4 5 6 7 8 9 10 | area_polygon(x, ...)
## Default S3 method:
area_polygon(x, y = NULL, ...)
## S3 method for class 'formula'
area_polygon(x, data = parent.frame(), ...)
## S3 method for class 'area_polygon'
print(x, ...)
|
x, y |
numeric vectors defining vertices in order. Any method recognized by grDevices::xy.coords() is accepted. Or a formula for other methods. Or an object of class "area_polygon" |
... |
Additional arguments, currently not used |
data |
a data frame |
An object of class "area_polygon". A single numerical value with the polygon area with an attribute giving the sign, as determined by the orientation of the vertices.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.