set.seed(123)
# 50 random points
xy <- matrix(runif(100), ncol = 2) * 2 - 1
# centred unit polygon
traps <- matrix(c(0,0,1,1,0,0,1,1,0,0), ncol = 2) - 0.5
Tsk <- matrix(1, nrow = 1, ncol = 5)
markocc <- rep(1,5)
cumk <- c(0,5,0) # zero-terminated
detectfn <- 14 # hazard half-normal
gsb <- c(lambda0 = 0.2, sigma = 0.5)
h <- hdotpolycpp(xy, traps, Tsk, markocc, cumk, detectfn, gsb,
convex = TRUE, dim = 2, grain = 1, ncores = 2)
Run the code above in your browser using DataLab