R/convexhull.R

convexhull <- function(x,y){

chI <- chull(x,y)
chI <- c(chI,chI[1])
hullX <- x[chI]
hullY <- y[chI]

TA <- hullarea(hullX,hullY)

out <- list()
out$TA <- TA
out$xcoords <- hullX
out$ycoords <- hullY
out$ind <- chI

out

}

Try the siar package in your browser

Any scripts or data that you put into this service are public.

siar documentation built on May 2, 2019, 11:02 a.m.