collapse.k | R Documentation |
Reduce capture histories to a single (k=1) count.
collapse.k(scrFrame)
scrFrame |
An scrFrame. |
scrFRame |
An edited scrFrame with counts and k=1. |
Chris Sutherland
data("rbs_ecography")
rbs.data <- data2oscr(edf = rbs.edf, #the EDF
sess.col = 1, #session column
id.col = 2, #individual column
occ.col = 3, #occasion column
trap.col = 4, #trap column
sex.col = 5, #sex column (optional)
tdf = list(rbs.tdf1, rbs.tdf2, #list of TDF
rbs.tdf3, rbs.tdf4),
K = c(7,5,6,4), #occasion vector
ntraps = c(50,50,50,50), #no. traps vector
trapcov.names = c("jday","jday2"), #covariate names
tdf.sep = "/", #char used separator
sex.nacode = "U") #unknown sex code
scrFrame <- rbs.data$scrFrame
reduced.rbs <- collapse.k(scrFrame = scrFrame)
rbs.ss <- make.ssDF(reduced.rbs,3,1)
fit <- oSCR.fit(list(~1,~offset(log(effort)),~1), reduced.rbs, rbs.ss, encmod = "P")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.