Learn R Programming

swaRm (version 0.6.0)

chull_area: Surface Area of the Convex Hull

Description

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

Usage

chull_area(x, y, geo = FALSE)

chullArea(x, y, geo = FALSE)

Value

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

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 surface area is returned as square meters. If FALSE, it is returned as square units of the [x,y] coordinates. Default: FALSE.

Author

Simon Garnier, garnier@njit.edu

See Also

is_chull, chull_perimeter

Examples

Run this code
x <- rnorm(25)
y <- rnorm(25, sd = 3)
chull_area(x, y)

Run the code above in your browser using DataLab