Learn R Programming

shotGroups (version 0.3)

getXYmat: Extract (x,y)-coordinates (relative to point of aim) from a data frame

Description

Extracts (x,y)-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)

Arguments

DF
a data frame containing (at least) either the variables Point.X, Point.Y or X, Y defining the bullet holes. Variables Aim.X, Aim.Y can define the point of aim. If missing, point
xyTopLeft
a logical value indicating whether the origin of the absolute coordinate system is in the top-left corner. This is the default for data exported by OnTarget PC/TDS.
relPOA
a logical value indicating whether returned coordinates should be relative to the point of aim.

Value

  • A numerical matrix with the (x,y)-coordinates.

See Also

groupLocation, groupShape, groupSpread

Examples

Run this code
data(DFcm)

# select data from only first series
DFsub <- subset(DFcm, Series == 1)
getXYmat(DFsub, xyTopLeft=TRUE, relPOA=TRUE)

Run the code above in your browser using DataLab