poly_area: Calculate the area of the polygon with the given vextices

Description Usage Arguments Value Examples

View source: R/poly_area.R

Description

Calculate the area of the polygon with the given vextices

Usage

1
poly_area(x, y)

Arguments

x

Numeric. An array contains the x coordinates of the vextices.

y

Numeric. An array contains the y coordinates of the vextices.

Value

The area of the polyon.

Examples

1
2
3
4
5
6
## Not run: 
x <- c(0, 0, 1, 1)
y <- c(1, 0, 0, 1)
poly_area(x, y)

## End(Not run)

hxfan1227/efdcr documentation built on Jan. 10, 2020, 4:01 p.m.