usage {secr} | R Documentation

## Detector Usage

### Description

Extract or replace usage (effort) information of a `traps` object (optional).

### Usage

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

### Arguments

`object` | `traps` object
`value` | numeric matrix of detectors x occasions
`...` | other arguments (not used)

### Details

In secr versions before 2.5.0, usage was defined as a binary value (1 if trap k used on occasion s, zero otherwise).

In later versions, usage may take nonnegative real values and will be interpreted as effort. This corresponds to the constant T_s used for the duration of sampling by Borchers and Efford (2008). Effort is modelled as a known linear coefficient of detection probability on the hazard scale (secr-varyingeffort.pdf; Efford et al. 2013).

For replacement of usage, various forms are possible for `value`:

- a matrix in which the number of rows of `value` exactly matches the number of traps K in `object`

- a vector of two values, the usage (typically 1) and the number of occasions S (a K x S matrix will be filled with the first value)

- a vector of R+1 values where R is the number of sessions in a multi-session object and elements 2..R+1 correspond to the numbers of occasions S1, S2,... in each session

- the usage only (typically 1) (only works when replacing an existing usage matrix with known number of occasions).

### Value

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

### Note

At present, assignment of usage to the traps objects of a multisession capthist object results in the loss of session names from the latter.

### References

Efford, M. G., Borchers D. L. and Mowat, G. (2013) Varying effort in capture–recapture studies. Methods in Ecology and Evolution 4, 629–636.

### See Also

`traps`, `usagePlot`, `read.capthist`, `addSightings`

### Examples

    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)

    usage(traps(ovenCH)) <- c(1,9,10,10,10,10)
    ## restore lost names
    names(ovenCH) <- 2005:2009

[Package secr version 3.2.1 Index]