calcMidRange {PBSmapping} | R Documentation |
Calculates the midpoint of the X
/Y
ranges of polygons
found in a PolySet.
calcMidRange (polys, rollup = 3)
polys |
PolySet to use. |
rollup |
level of detail in the results; 1 = PID s
only, 2 = outer contours only, and 3 = no roll-up. |
If rollup
equals 1
, the results contain a mean range for
each unique PID
only. When it equals 2
, they contain
entries for outer contours only. Finally, setting it to 3
prevents roll-up, and they contain a mean range for each unique
(PID
, SID
).
PolyData with columns PID
, SID
(may be missing),
X
, and Y
.
calcArea
,
calcCentroid
,
calcLength
,
calcSummary
.
#--- load the data (if using R) if (!is.null(version$language) && (version$language == "R")) data(nepacLL) #--- calculate and print the centroids for several polygons print(calcMidRange(nepacLL[is.element(nepacLL$PID, c(33, 39, 47)), ]))