X <- amacrine
J <- (marks(X) == "off")
online <- interactive()
eps <- if(online) NULL else 0.025
if(online && require(spatstat.model)) {
mod <- ppm(X ~ marks * x, eps=eps)
lambdaX <- fitted(mod, dataonly=TRUE)
lambdaOff <- predict(mod, eps=eps)[["off"]]
lmin <- min(lambdaOff) * 0.9
} else {
## faster computation for package checker only
lambdaX <- intensity(X)[as.integer(marks(X))]
lmin <- intensity(X)[2] * 0.9
}
plot(FmultiInhom(X, J, lambda=lambdaX, lambdamin=lmin, eps=eps))
Run the code above in your browser using DataLab