file <- system.file("external/spain.tif", package="usdm")
r <- rast(file) # reading a RasterBrick including 5 rasters (predictor variables)
r
plot(r[[1]]) # visualize the raster layers
v1 <- Variogram(r[[1]]) # compute variogram for the first raster
plot(v1)
plot(v1,cloud=TRUE)
plot(v1,box=TRUE)
Run the code above in your browser using DataLab