polygon_area: Calculate the area of a polygon

Description Usage Arguments Details Value See Also

View source: R/circles.R

Description

The function starts by finding the centroid of the points and then orders them from their angle to the center, whereafter it computes the area using the triangle method.

Usage

1

Arguments

x

X coordinates for the vertices of the polygon

y

Y coordinates for the vertices of the polygon

Details

polygon_area is vectorized and hence faster than implementations relying on for loops.

Value

Area of the polygon

See Also

polyarea


jolars/euclidr documentation built on May 19, 2019, 7:25 p.m.