bcharea <-
function(buff,traplocs){
# requires package "rgeos"
p1<-Polygon(rbind(traplocs,traplocs[1,]))
p2<-Polygons(list(p1=p1),ID=1)
p3<-SpatialPolygons(list(p2=p2))
p1ch<-gConvexHull(p3)
##gArea(p1ch)
bp1<-(gBuffer(p1ch, width=buff))
plot(bp1, col='gray')
plot(p1ch, border='black', lwd=2, add=TRUE)
gArea(bp1)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.