| stratify {openCR} | R Documentation |
Stratify Capture-Recapture Data
Description
Arrange existing capthist data in stratified form.
Usage
stratify(..., intervals = NULL, MoreArgs = list(), covariate = NULL, bytraps = FALSE)
Arguments
... |
one or more multi-session capthist objects, or a list of such objects |
intervals |
list of intervals vectors, one for each multi-session capthist in ... |
MoreArgs |
list of other arguments passed to |
covariate |
character; name of individual or trap covariate to stratify by |
bytraps |
logical; if TRUE then covariate is interpreted as the name of a detector covariate |
Details
The argument ... may be
a list of single-session capthist, one for each stratum (sessions already joined)
a list of multi-session capthist, one for each stratum (sessions will be joined)
one single-session capthist, to split by
covariate(sessions already joined)one multi-session capthist, to be joined as one then split by
covariate
Cases 1 and 2 result in one stratum for each component of the input list.
Cases 3 and 4 result in one stratum for each level of covariate.
The result in Case 1 is identical to MS.capthist(...).
The argument intervals refers to the intervals between primary sessions
before joining (Cases 2,4 only) (see Examples).
MoreArgs may include the arguments remove.dupl.sites, tol, sites.by.name or drop.sites of join; these otherwise take their default values.
Value
Multi-stratum (multi-session) capthist object for which each component has been ‘join’ed.
See Also
join,
MS.capthist,
openCR.fit,
strata
Examples
# FebpossumCH comprises 9 annual February sessions.
# The individual covariate 'sex' takes values 'F' and 'M', resulting in two strata.
# 'intervals' can be omitted as the default does the same job.
ch <- stratify(FebpossumCH, covariate = 'sex', intervals = rep(list(rep(1,8)),2))
summary(ch, terse = TRUE)