# first example: one-dimensional simulations
# library(RandomFields)
options(locatorBell=FALSE)
x <- seq(1,10,0.1)
ShowModels(x=x, covx=10, cov.def=100, type="l")
x <- seq(1,10,0.1)
ShowModels(x=x, y=x, covx=10, cov.def=100)
# second example: two-dimensional simulations and
# empirical variogram
dx <- runif(300,0,8)
dy <- runif(300,0,8)
dz <- GaussRF(x=dx, y=dy, grid=FALSE, model="gaus",
param=c(1,2,1,2))
ev <- EmpiricalVariogram(x=dx, y=dy, data=dz, grid=FALSE,
bin=(-1:20)/4)
x <- seq(1,5,0.1);
ShowModels(x=x, y=x, empirical=ev)
# third example: two-dimensional anistropic simulations and
# link functionx <- seq(1,10,0.1)
ShowModels(x=x, y=x, link=function(x) exp(x),
model=list(list(model="spheric", var=1, aniso=c(1,0,0,5))))
x <- seq(1,10,0.1)
ShowModels(x=x, link=function(x) exp(x),
model=list(list(model="spheric",var=1, scale=1)))x <- seq(1,10,0.1)
ShowModels(x=x, link="MaxStable", fixed.rs=TRUE,
model=list(list(model="gauss",var=1, scale=1)), type="l")
Run the code above in your browser using DataCamp Workspace