data("swissRain")
swissRain = unwrap(swissRain)
swissRain$lograin = log(swissRain$rain)
swissv= variog(swissRain, formula=lograin ~ 1,option="bin")
swissEnv = variogMcEnv(swissRain, lograin ~ 1, obj.var=swissv,nsim=9)
if(!is.null(swissv)){
plot(swissv, env=swissEnv, main = "Swiss variogram")
}
Run the code above in your browser using DataLab