chull_perimeter: Perimeter of the Convex Hull

View source: R/chull.R

chull_perimeterR Documentation

Perimeter of the Convex Hull

Description

Given a set of locations, this function determines the perimeter of the convex hull (or envelope) of the set.

Usage

chull_perimeter(x, y, geo = FALSE)

chullPerimeter(x, y, geo = FALSE)

Arguments

x

A vector of x (or longitude) coordinates.

y

A vector of y (or latitude) coordinates.

geo

A logical value indicating whether the locations are defined by geographic coordinates (pairs of longitude/latitude values). If TRUE, the perimeter is returned as meters. If FALSE, it is returned as units of the [x,y] coordinates. Default: FALSE.

Value

A single numeric value corresponding to the perimeter of the convex hull (in meters if geo is TRUE).

Author(s)

Simon Garnier, garnier@njit.edu

See Also

is_chull, chull_area

Examples

x <- rnorm(25)
y <- rnorm(25, sd = 3)
chull_perimeter(x, y)


swarm-lab/swaRm documentation built on Dec. 3, 2023, 9:30 p.m.