getXYmat {shotGroups} | R Documentation |
Extract (x,y)-coordinates (relative to point of aim) from a data frame
Description
Extracts (x,y)- or (x,y,z)-coordinates of the points of impact (relative to the point of aim) from a data frame and returns them as a matrix.
Usage
getXYmat(DF, xyTopLeft = TRUE, relPOA = TRUE, center = FALSE)
Arguments
DF |
a data frame containing (at least) either the variables |
xyTopLeft |
logical: is the origin of the absolute coordinate system in the top-left corner? See details. |
relPOA |
logical: should returned coordinates be relative to the point of aim? |
center |
logical: center groups to mean (0,0)? If variable |
Details
By default, OnTarget PC/TDS' 'Export Point Data' places the origin of the absolute coordinate system in the top-left corner. In OnTarget TDS, this setting can be changed by checking the box 'Tools -> Options -> Options tab -> Data Export -> Invert Y-Axis on Export'. In that case, use xyTopLeft=FALSE
. If groups appear to be upside-down, xyTopLeft
is the setting to change.
Value
A numerical matrix with the (x,y)- or (x,y,z)-coordinates.
See Also
groupLocation
,
groupShape
,
groupSpread
Examples
data(DFcm)
# select data from only first series
DFsub <- subset(DFcm, series == 1)
getXYmat(DFsub, xyTopLeft=TRUE, relPOA=TRUE)