View source: R/make.scrFrame.R
make.scrFrame | R Documentation |
A helper function for creating the primary oSCR data object, an scrFrame, used for fitting spatial capture-recapture models with the fitting function oSCR.fit
.
make.scrFrame(caphist, traps, indCovs = NULL, trapCovs = NULL, trapOperation = NULL, telemetry = NULL, rsfDF = NULL, type = "scr")
caphist |
A list of capture history arrays with dimensions |
traps |
A list of trap coordinates, one for each session. The coordinate columns must be named ‘X’ and ‘Y’ (note these are capitals). All traps used in the study must be provided here and should coincide with the columns of the |
indCovs |
A list, one for each session, containing individual-specific data. Currently two types of individual covariates are used: 1) sex, a binary (two-class) covariate codes as 1 for males, 0 for females, and NA for individuals with unknown sex. 2) removed, a integer value detailing on which occasion an individual was removed from the study (e.g., a mortality event). If there were no removals then this information is not required.\ If supplied, the columns of the |
trapCovs |
A two level list (a list of lists, lol). A list for each session contains a list of data frames, one for each occasion, i.e., trap covariates can be time-varying. The occasion level data has a row for each trap matching the |
trapOperation |
A list of binary matrices with dimension |
telemetry |
A list with 2 or 3 objects containing data from collared individuals: 1) 2) 3) |
rsfDF |
Similar to the By specifying the |
type |
This should be set to "SCR". |
The scrFrame is the formatted data object required for fitting SCR models using oSCR.fit
. A variety of error checks are conducted to ensure that the individual data objects are consistent.
An object of class scrFrame
Chris Sutherland
data(rbs)
caphist <- rbs.sf$caphist
traps <- rbs.sf$traps
trapCovs <- rbs.sf$trapCovs
sf <- make.scrFrame(caphist = caphist, traps = traps, trapCovs = trapCovs, type = "scr")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.