This function plots the study area grid, available habitat, and trap coordinates for spatial capture-recapture studies. Activity centers and capture locations can also be plotted.
plotSpatialData(
mms = NULL,
trapCoords,
studyArea,
centers = NULL,
trapLines = FALSE
)
An optional object of class multimarkSCRsetup-class
from which the (re-scaled) study area and trap coordinates are plotted.
A matrix of dimension ntraps
x (2 + noccas
) indicating the Cartesian coordinates and operating occasions for the traps, where rows correspond to trap, the first column the x-coordinate, and the second column the y-coordinate. The last noccas
columns indicate whether or not the trap was operating on each of the occasions, where `1' indciates the trap was operating and `0' indicates the trap was not operating. Ignored unless mms=NULL
.
A 3-column matrix defining the study area and available habitat. Each row corresponds to a grid cell. The first 2 columns indicate the Cartesian x- and y-coordinate for the centroid of each grid cell, and the third column indicates whether the cell is available habitat (=1) or not (=0). All cells must have the same resolution. Ignored unless mms=NULL
.
Note that rows should be ordered in raster cell order (raster cell numbers start at 1 in the upper left corner, and increase from left to right, and then from top to bottom).
An optional vector indicating the grid cell (i.e., the row of studyArea
) that contains the true (latent) activity centers for each individual. If mms
is provided, then centers
must be of length nrow(Enc.Mat)
(i.e., a center must be provided for each observed individual).
Logical indicating whether to draw lines from activity centers to respective traps at which each individual was captured. Default is trapLines=FALSE
. Ignored when mms=NULL
or centers=NULL
.
Brett T. McClintock
#Plot the tiger example data
plotSpatialData(trapCoords=tiger$trapCoords,studyArea=tiger$studyArea)
Run the code above in your browser using DataLab