plotSpatialData: Plot spatial capture-mark-recapture data

View source: R/ClosedSCR.R

plotSpatialDataR Documentation

Plot spatial capture-mark-recapture data

Description

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.

Usage

plotSpatialData(
  mms = NULL,
  trapCoords,
  studyArea,
  centers = NULL,
  trapLines = FALSE
)

Arguments

mms

An optional object of class multimarkSCRsetup-class from which the (re-scaled) study area and trap coordinates are plotted.

trapCoords

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.

studyArea

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).

centers

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).

trapLines

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.

Author(s)

Brett T. McClintock

Examples

#Plot the tiger example data
plotSpatialData(trapCoords=tiger$trapCoords,studyArea=tiger$studyArea)


multimark documentation built on March 31, 2023, 9:33 p.m.