# NOT RUN {
# load the example raster data
awt <- raster::brick(system.file("extdata", "awt.grd", package = "blockCV"))
# run the model in parallel
range1 <- spatialAutoRange(rasterLayer = awt,
sampleNumber = 5000, # number of cells to be used
doParallel = TRUE,
nCores = 2, # if NULL, it uses half of the CPU cores
plotVariograms = FALSE,
showPlots = TRUE)
# run the model with no parallel
range3 <- spatialAutoRange(rasterLayer = awt,
sampleNumber = 5000,
doParallel = FALSE,
progress = TRUE)
# show the result
summary(range1)
# }
Run the code above in your browser using DataLab