| convexHull | R Documentation |
This function constructs the convex hull of a set of points.
convexHull(pointsDF, hullIndices = NULL)
pointsDF |
A data frame with the x and y coordinates of the points. |
hullIndices |
Precalculated hull indices. Default is |
The points must be provided as a data frame with two columns.
A data frame with two columns representing the points on the convex hull.
pointsDF <- data.frame(a = c(1, 2, 2, 3, 3, 4, 5, 6, 8, 6,
7, 8, 6, 8, 10, 3, 1),
b = c(2, 3, 4, 8, 5, 6, 5, 4, 8, 11, 13, 14, 2, 1, 2, 14, 9))
hull <- convexHull(pointsDF)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.