I am able to get addTelemetry to run with mark-recapture data, but when I try mark-resight data, I get an error message. Is my code wrong, or is this simply not going to work? See below.
- Code: Select all
# sim mark-recap data
grid.mr <- make.grid()
pop <- sim.popn(grid.mr, D = 10)
simCap <- sim.capthist(grid.mr, detectpar = list(lambda0 = 0.1, sigma = 20),
popn = pop, renumber = FALSE, detectfn = "HHN")
# sim telemetry data
tel <- make.telemetry()
popTel <- subset(pop, sample.int(nrow(pop), 10))
simTel <- sim.capthist(tel, popn = popTel, renumber = FALSE, detectfn = "HHN",
detectpar = list(sigma = 20), noccasions = 1, exactN = 5)
# sim mark-resight data
grid.rs <- make.grid(detector = c("multi", rep("count",4)),
markocc = c(1, rep(0, 4)))
simSight <- sim.resight(grid.rs, detectpar=list(g0 = c(0.3, rep(0.1, 4)),
sigma = 20), popn = pop, renumber=F, pID = 0.7)
# addTelemetry
MRdata <- addTelemetry(simCap, simTel, type = 'concurrent') # OK
RSdata <- addTelemetry(simSight, simTel, type = 'concurrent') # error
# Error in `usage<-`(`*tmp*`, value = newusge) :
# replacement value not compatible with existing markocc attribute