Computes and draws the convex hull of the set of points specified.
Usage
ternary_hull(x, y, z, ...)
# S4 method for class 'numeric,numeric,numeric'
ternary_hull(x, y, z, center = FALSE, scale = FALSE, ...)
# S4 method for class 'ANY,missing,missing'
ternary_hull(x, center = FALSE, scale = FALSE, ...)Arguments
- x, y, z
A
numericvector giving the x, y and z ternary coordinates of a set of points. Ifyandzare missing, an attempt is made to interpretxin a suitable way (seegrDevices::xyz.coords()).- ...
Further arguments to be passed to
graphics::polygon().- center
A
logicalscalar specifying wether the data should be centered, or anumericvector giving the center.- scale
A
logicalscalar specifying wether the data should be scaled, or anumericvector giving the scale factor.
See also
grDevices::chull(), graphics::polygon()
Other statistics:
ternary_contour(),
ternary_density(),
ternary_ellipse(),
ternary_mean(),
ternary_pca()
Examples
## Convex hull
## Data from Aitchison 1986
ternary_plot(lava, panel.first = ternary_grid(5, 10))
ternary_hull(lava, border = "red")
