Learn R Programming

secr (version 4.6.10)

nontarget: 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

Value

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

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.

See Also

plot.capthist, summary.capthist

Examples

Run this code

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

Run the code above in your browser using DataLab