# adds convex hull with semi-transparent area over two clusters of points
library(mdatools)
data(people)
group <- factor(people[, "Sex"], labels = c("Male", "Female"))
p <- mdaplot(people, type = "p", cgroup = group)
plotConvexHull(p)
Run the code above in your browser using DataLab