library(spatstat.geom)
library(spatstat.random)
library(spatstat.explore)
X <- rpoispp(function(x,y) {100 * exp(-3*x)}, 100)
marks(X) <- runif(npoints(X), 1, 10)
mcorrinhom.ppp(X, ftype = "stoyan",
method = "density", correction = "translate",
method_lambda = "kernel", bw = bw.scott)
Run the code above in your browser using DataLab