Learn R Programming

isopleuros (version 1.4.0)

ternary_hull: Convex Hull of a Set of Points

Description

Computes and draws the convex hull of the set of points specified.

Usage

ternary_hull(x, y, z, ...)

# S4 method for numeric,numeric,numeric ternary_hull(x, y, z, center = FALSE, scale = FALSE, ...)

# S4 method for ANY,missing,missing ternary_hull(x, center = FALSE, scale = FALSE, ...)

Value

ternary_hull() is called it for its side-effects.

Arguments

x, y, z

A numeric vector giving the x, y and z ternary coordinates of a set of points. If y and z are missing, an attempt is made to interpret x in a suitable way (see grDevices::xyz.coords()).

...

Further arguments to be passed to graphics::polygon().

center

A logical scalar specifying wether the data should be centered, or a numeric vector giving the center.

scale

A logical scalar specifying wether the data should be scaled, or a numeric vector giving the scale factor.

Author

N. Frerebeau

See Also

grDevices::chull(), graphics::polygon()

Other statistics: ternary_contour(), ternary_density(), ternary_ellipse(), ternary_mean(), ternary_pca()

Examples

Run this code
## Convex hull
## Data from Aitchison 1986
ternary_plot(lava, panel.first = ternary_grid(5, 10))
ternary_hull(lava, border = "red")

Run the code above in your browser using DataLab