# homogeneous Poisson processes
set.seed(2)
h1 <- rstpp(lambda = 500)
set.seed(2)
h2 <- rstpp(lambda = 500, minX = 0,
maxX = 2, minY = 3, maxY = 5, minT = 1, maxT = 9)
set.seed(2)
h3 <- rstpp(lambda = 900, nsim = 3, verbose = TRUE)
# inhomogeneous Poisson process
set.seed(2)
inh <- rstpp(lambda = function(x, y, t, a) {exp(a[1] + a[2]*x)}, par = c(2, 6))
Run the code above in your browser using DataLab