RFoptions(seed=0)
#Example 1
x <- if (interactive()) 0:1000 else 0:10
model <- RMgauss(scale=50)
z <- RFsimulate(RPschlather(model), x)
plot(z)
y <- if (interactive()) 0:100 else 0:10
cov <- RFcov(model, y)
ecf <- RFcov(RMschlather(model), y)
matplot(y, cbind(cov, ecf), type="l")
# Example 2
x <- if (interactive()) 0:1000 else 0:10
model <- RMschlather(model)
z <- RFsimulate(RPschlather(model), x)
plot(z)
y <- if (interactive()) 0:100 else 0:10
cov <- RFcov(model, y)
ecf <- RFcov(RMschlather(model), y)
matplot(y, cbind(cov, ecf), type="l")
RFoptions(seed=NA)
Run the code above in your browser using DataLab