nontarget {secr} | R Documentation |
Non-target detections and interference events may be recorded in a binary detector x occasion matrix attached as an attribute to a single-session capthist object, or to each component of a multi-session capthist object.
Models fitted by secr make no use of these data. They may be used in ipsecr.
From secr 4.5.6, a summary of nontarget data is reported by the
summary
method for capthist objects, and the verify
method reports clashes between detections and nontarget data.
Extraction and replacement funcions are provided from secr 4.5.7 on.
nontarget(object, ...)
nontarget(object) <- value
object |
capthist object |
... |
other argments (not used) |
value |
numeric binary matrix (rows = detectors, columns = occasions) |
The order of rows should match the order of detectors in traps(object)
.
Matrix entries should be zero for trap x occasion combinations that were not used
(see usage) or for which there is a corresponding detection.
value
is coerced to a matrix before assignment.
For nontarget()
, a matrix or list of matrices.
plot.capthist
, summary.capthist
set.seed(123)
ch <- captdata
# traps that caught something
caught <- t(apply(ch, 2:3, sum))
# construct artificial nontarget data
# (positive for half the traps that caught nothing)
nontarget(ch) <- (1-caught) * (runif(500)>0.5)
head(caught)
head(nontarget(ch))
# the summary method recognises the 'nontarget' attribute
summary(ch)$nontarget