Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

capthistfn

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)
alive(object)
alongtransect(object, tol = 0.01)
xy(object)
xy(object) <- value
telemetryxy(object, includeNULL = FALSE)
telemetryxy(object) <- value
telemetered(object)

Arguments

object

a ‘capthist’ object

names

if FALSE the values returned are numeric indices rather than names

tol

tolerance for snapping to transect line (m)

value

replacement value (see Details)

includeNULL

logical; if TRUE a NULL component is included for untelemetered animals

Details

These functions extract data on detections, ignoring occasions when an animal was not detected. Detections are ordered by occasion, animalID and trap.

trap returns polygon or transect numbers if traps(object) has detector type ‘polygon’ or ‘transect’.

alongtransect returns the distance of each detection from the start of the transect with which it is associated.

Replacement values must precisely match object in number of detections and in their order. xy<- expects a dataframe of x and y coordinates for points of detection within a ‘polygon’ or ‘transect’ detector. telemetryxy<- expects a list of dataframes, one per telemetered animal.

Value

For animalID and trap a vector of numeric or character values, one per detection.

For alive a vector of logical 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’.

If object has multiple sessions, the result is a list with one component per session.

See Also

Examples

## `captdata' is a demonstration dataset
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))

secr

Spatially Explicit Capture-Recapture

v4.4.1
GPL (>= 2)
Authors
Murray Efford
Initial release
2021-05-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.