create.capt | R Documentation |
Creates a capture history object to use with the function
fit.ascr
.
create.capt( captures, n.traps = NULL, n.sessions = NULL, traps = NULL, mrds.locs = NULL )
captures |
A data frame of capture records, see 'Details' for the correct format. |
n.traps |
The number of traps deployed on each session. If the number of traps varies between sessions, then this must be a vector with the ith element providing the number of traps deployed on the ith session. |
n.sessions |
The total number of sessions. |
traps |
A matrix of trap locations, or a list for
multi-session models (see fit.ascr). If this argument is
provided, there is no need to specify |
mrds.locs |
A matrix of animal locations, or a list for multi-session models. See 'Details'. |
The captures
argument to this function is intended to be of
a similar format to the captures
argument to
make.capthist in the secr package. That is, users can
use the same captures
data frame with create.capt
and
make.capthist
, which generate capture histories for use with
the ascr
and secr packages respectively.
As such, the first, second, and fourth columns should provide the
session, the identification number of the detected animal or sound,
and the trap number of the trap which made the detection (where the
trap number is the row number of the corresponding trap in the
matrix of trap locations), respectively. Note that, for the
secr package, the third column of the captures
data
frame provides the 'occassion' of the detection for
make.capthist. However, the ascr package does not presently
have the capabilities to deal with multi-occassion data, so the
third column is ignored by create.capt
.
Additional columns can specify the auxiliary information collected over the course of the survey:
A column named bearing
, containing estimated bearings
(in radians) from the detector to each detected animal or sound.
A column named dist
, containing the estimated
distance between the detected animal or sound.
A column named ss
containing the measured signal
strengh of the detected sound.
A column named toa
containing the measured time of
arrival (in seconds) since the start of the survey (or some
other reference time) of the detected sound (only
possible when the detectors are microphones).
If animal or sound locations are known exactly, then a
mark-recapture distance sampling (MRDS) model can be fitted. In
this case, for single-session models the mrds.loc
argument
should be a matrix, where each row corresponds to the known x- and
y-coordiates of an animal. The row number should match with the
individual's ID number in the captures data frame, so for example
the animal with an ID of 5 should have their location's x- and
y-coordinates in the fifth row of mrds.locs
. For multi-session
models, the mrds.loc
argument should be a list of such
matrices, where each component is associated with one of the
sessions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.