This function is a simple substitute for the secr function
sim.popn() for the case of a linear habitat.
numeric density animals / km
number of individuals
character string for distribution of total number of individuals
other arguments passed to
The linearmask input represents a discretized line - essentially a chain
of line segments. By default, each segment is populated with a Poisson number of
individuals. The user may specify
D may be a vector with one density per mask pixel, or a single
number that will be applied across all pixels.
Ndist = 'fixed' then a constant number of individuals N are
simulated in each trial; otherwise N has a Poisson distribution across
trials. N = sum(
D) x mask length if
This is a simplified wrapper for
model2D = "linear".
Object of class c(‘linearpopn’, ‘popn’, ‘data.frame’).
The population output from
sim.linearpopn may be used unchanged
with secr functions such as
sim.capthist. However, to be faithful to the
linear network you should set the ‘userdist’ argument of
1 2 3 4 5 6 7 8 9 10 11 12 13
x <- seq(0, 4*pi, length = 200) xy <- data.frame(x = x*100, y = sin(x)*300) mask <- read.linearmask(data = xy, spacing = 10) trps <- make.line(mask, n = 15, startbuffer = 1000, by = 30) newmask <- clipmask(mask, trps, buffer = 200) linpop <- sim.linearpopn(newmask, 200) CH <- sim.capthist(trps, linpop, userdist = networkdistance) plot(newmask) plot(CH, add = TRUE) secr.fit(CH, mask = mask, details = list(userdist = networkdistance))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.