Learn R Programming

shotGroups (version 0.2-2)

getXYmat: Matrix of (x,y)-coordinates relative to point of aim

Description

Returns the matrix of (x,y)-coordinates of the points of impact relative to the point of aim. This matrix can then be used in functions like groupLocation, groupShape, or groupSpread.

Usage

getXYmat(DF, xyTopLeft = TRUE)

Arguments

DF
a data frame containing (at least) these variables: Aim.X, Aim.Y defining point of aim, Point.X, and Point.Y defining the bullet holes.
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.

Value

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

See Also

groupLocation, groupShape, groupSpread

Examples

Run this code
data(DFcm)

# select combined data from only first 2 series
DF <- subset(DFcm, Series %in% 1:2)
xy <- getXYmat(DF, xyTopLeft=TRUE)
groupLocation(xy, plots=2)

Run the code above in your browser using DataLab