Polyarea {shipunov} | R Documentation |
Area of the polygon
Description
Calculates area of polygon
Usage
Polyarea(x)
Arguments
x |
Polygon vertices: two-column numerical matrix or data frame |
Details
Based on vegan::summary.ordihulls().
Value
Numerical vector of length 1.
Author(s)
Alexey Shipunov
See Also
Examples
x <- c(1:9, 8:1) # from ?polygon
y <- c(1, 2*(5:3), 2, -1, 17, 9, 8, 2:9)
Polyarea(cbind(x, y)) # numerical matrix
Polyarea(data.frame(x, y)) # numerical data frame
[Package shipunov version 1.17.1 Index]