nontarget: Non-target Data

nontargetR Documentation

Non-target Data

Description

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.

Usage


nontarget(object, ...)
nontarget(object) <- value

Arguments

object

capthist object

...

other argments (not used)

value

numeric binary matrix (rows = detectors, columns = occasions)

Details

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.

Value

For nontarget(), a matrix or list of matrices.

See Also

plot.capthist, summary.capthist

Examples


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


secr documentation built on Nov. 4, 2024, 9:06 a.m.