Learn R Programming

secr (version 2.4.0)

usage: Detector Usage

Description

Extract or replace usage information of a traps object.

Usage

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

Arguments

object
a traps object
value
a matrix of traps x occasions 1 if trap[i] used on occasion[j], zero otherwise.
...
other arguments (not used)

Value

  • usage(object) returns the usage matrix of the traps object. usage(object) may be NULL.

Details

For replacement, the number of rows of value must match exactly the number of traps in object.

See Also

traps

Examples

Run this code
demo.traps <- make.grid(nx = 6, ny = 8)
## random usage over 5 occasions
usage(demo.traps) <- matrix (sample(0:1, 48*5, replace = TRUE, 
    p = c(0.5,0.5)), nc = 5)
usage(demo.traps)
summary(demo.traps)

Run the code above in your browser using DataLab