Description Usage Arguments Value See Also Examples
A generic S3 function that computes the area of polygons given the coordinates of its vertices arranged as a matrix where each column is a vertex numbered in counterclockwise manner.
1 | polygonArea(p)
|
p |
Matrix containing the vertices of the polygon. |
Area of the polygon.
1 2 | poly <- newPolygon(c(0, 1, 1, 0), c(0, 0, 1, 1))
print(polygonArea(poly))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.