if (FALSE) {
file <- system.file("external/spain.tif", package="usdm")
r <- rast(file) # reading a RasterBrick object including 10 raster layers in Spain
r
plot(r[[1]]) # plot the first RasterLayer in r
v1 <- Variogram(r[[1]]) # compute the sample variogram for the first layer in r
v2 <- Variogram(r[[1]],lag=25000,cutoff=100000) # specify the lag and cutoff parameters
}
Run the code above in your browser using DataLab