calcConvexHull {PBSmapping} | R Documentation |
Calculate the convex hull for a set of points.
calcConvexHull (xydata, keepExtra=FALSE)
xydata |
a data frame with columns |
keepExtra |
logical: if |
This routine uses the function chull()
in the package grDevices.
By default, it ignores all columns other than X
and Y
;
however, the user can choose to retain additional columns in xydata
by specifying keepExtra=TRUE
.
PolySet with columns PID
, POS
, X
, Y
,
and additional columns in xydata
if keepExtra=TRUE
.
addPoints
,
addPolys
,
calcArea
,
calcCentroid
,
calcMidRange
,
calcSummary
,
locateEvents
,
plotMap
,
plotPoints
,
plotPolys
.
data(surveyData) #--- plot the convex hull, and then plot the points plotMap(calcConvexHull(surveyData),col="moccasin") addPoints(surveyData,col="blue",pch=17,cex=.6);