age.matrix: Session-specific Ages

age.matrixR Documentation

Session-specific Ages

Description

A matrix showing the age of each animal at each secondary session (occasion).

Usage


age.matrix(capthist, initialage = 0, minimumage = 0, maximumage = 1, collapse = FALSE)

Arguments

capthist

single-session capthist object

initialage

numeric or character name of covariate with age at first detection (optional)

minimumage

integer minimum age

maximumage

integer maximum age

collapse

logical; if TRUE then values for each individual are collapsed as a string with no spaces

Details

age.matrix is used by openCR.design for the predictors ‘age’ and ‘Age’.

Computations use the intervals attribute of capthist, which may be non-integer.

Ages are inferred for occasions before first detection, back to the minimum age.

Value

Either a numeric matrix with dimensions (number of animals, number of secondary occasions) or if collapse = TRUE a character matrix with one column.

See Also

openCR.design

Examples


age.matrix(join(ovenCH), maximumage = 2, collapse = TRUE)


openCR documentation built on Sept. 25, 2022, 5:06 p.m.