| stratify | R Documentation |
Arrange existing capthist data in stratified form.
stratify(..., intervals = NULL, MoreArgs = list(), covariate = NULL, bytraps = FALSE)
... |
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 |
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.
Multi-stratum (multi-session) capthist object for which each component has been ‘join’ed.
join,
MS.capthist,
openCR.fit,
strata
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.