RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
## RFoptions(seed=NA) to make them all random again
StartExample()
## example for implicite use
model <- RMgauss(var=10, s=10) + RMnugget(var=0.1)
plot(model)
plot(RFsimulate(model=model, 0:10, 0:10, n=4))
## The following function shows the internal structure of the model.
## In particular, it can be seen that RPspecific is applied to RMplus.
RFgetModelInfo(level=0, which="internal")
## example for explicite used
model <- RPspecific(RMS(var=unif(min=0, max=10), RMgauss()))
x <- seq(0,10,0.02)
n <- 10
if(RFoptions()$internal$examples_reduced){warning("reduced 'n'"); n<-1}
for (i in 1:n) { readline(paste("Simulation no.", i, ": press return", sep=""))
plot(RFsimulate(model, x=x, n=6, seed=i), ylim=c(-5,5))
}
FinalizeExample()
Run the code above in your browser using DataLab