Learn R Programming

canprot (version 2.0.0)

add_hull: Add convex hull

Description

Adds a convex hull around the data.

Usage

add_hull(x, y = NULL, ...)

Value

Invisibly returns the result from chull.

Arguments

x

x values

y

y values

...

arguments for polygon

Details

add_hull draws a convex hull around the points given in x, y. This function is a wrapper for chull and polygon.

Examples

Run this code
dat <- iris[, 1:2]
plot(dat)
add_hull(dat)

Run the code above in your browser using DataLab