area | R Documentation |
Functions to calculate surface area.
area(x, ...)
## Default S3 method:
area(x, y, ...)
## S3 method for class 'polygon'
area(p)
area(default)
: Calculate surface area of a polygon using its vertex coordinates.
area(polygon)
: Calculate the area of a polygon
object.
x <- c(0, 0, 0.5, 1, 1, 0)
y <- c(0, 1, 0.5, 1, 0, 0)
area(x, y) # Calculate area of polygon.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.