capthist.parts {secr} | R Documentation

## Dissect Spatial Capture History Object

### Description

Extract parts of an object of class 'capthist'.

### Usage

    animalID(object, names = TRUE)
    occasion(object)
    trap(object, names = TRUE)
    xy(object)
    signal(object)
    xy(object) <- value
    signal(object) <- value

### Arguments

`object` | a 'capthist' object
`names` | if FALSE the values returned are numeric indices rather than names
`value` | replacement value (see Details)

### Details

These functions extract data on detections, ignoring occasions when an animal was not detected.

`trap` returns polygon or transect numbers if `traps(object)` has detector type 'polygon' or 'transect'.

Replacement values must precisely match `object` in number of detections in their order. `xy<-` expects a dataframe of x and y coordinates for points of detection within a 'polygon' or 'transect' detector.

### Value

For `animalID` and `trap` a vector of numeric or character values, one per detection.
For `occasion`, a vector of numeric values, one per detection.
For `xy`, a dataframe with one row per detection and columns 'x' and 'y'.
For `signal`, a numeric vector with one element per detection.

### Author(s)

Murray Efford murray.efford@otago.ac.nz

### See Also

`capthist`, `polyID`

### Examples

    data(captdata)
    animalID(captdata)

    temp <- sim.capthist(popn=list(D=1), make.grid(detector='count'))
    cbind(ID=as.numeric(animalID(temp)), occ=occasion(temp), trap=trap(temp))

[Package secr version 1.3.0 Index]