RFoptions(seed=0)
# example 1
x <- seq(0,25, if (interactive()) 0.02 else 5)
model <- RPpoisson(RMball(), intensity = 2)
z <- RFsimulate(x=x, model=model)
plot(z)
par(mfcol=c(2,1))
plot(z@data[,1:min(length(z@data), 1000)], type="l")
hist(z@data[,1], breaks=0.5 + (-1 : max(z@data)))
par(mfcol=c(1,1))
# example 2
x <- seq(0,10, if (interactive()) 0.01 else 1)
model <- RMgauss()
z <- RFsimulate(model=RPpoisson(RMtruncsupport(radius=5, model)),
x=x, mpp.intensity = 100)
plot(z)
RFoptions(seed=NA)
Run the code above in your browser using DataLab