demotrap <- make.grid()
tempcapt <- sim.capthist(demotrap,
popn = list(D = 5, buffer = 50),
detectpar = list(g0 = 0.15, sigma = 30))
plot(tempcapt, border = 10, rad = 3, tracks = TRUE,
lab1cap = TRUE, laboffset = 2.5)
## type = n.per.cluster
## generate some captures
testregion <- data.frame(x = c(0,2000,2000,0),
y = c(0,0,2000,2000))
popn <- sim.popn (D = 10, core = testregion, buffer = 0,
model2D = 'hills', details = list(hills = c(-2,3)))
t1 <- make.grid(nx = 1, ny = 1)
t1.100 <- make.systematic (cluster = t1, spacing = 100,
region = testregion)
capt <- sim.capthist(t1.100, popn = popn, noccasions = 1)
## now plot captures ...
temp <- plot(capt, title = 'Individuals per cluster',
type = 'n.per.cluster', hidetr = FALSE, gridl = FALSE,
cappar = list(cex = 1.5))
## add legend; click on map to place top left corner
legend (locator(1), pch = 21, pt.bg = temp$colour,
pt.cex = 1.3, legend = temp$legend, cex = 0.6)Run the code above in your browser using DataLab