powered by
Take a regular sample of a SpatRaster. The returned object has the same extent, but fewer cells.
# S4 method for SpatRaster,numeric sampleRegular(x, size, ...)
SpatRaster
numeric. The sample size
additional arguments. None implemented
# NOT RUN { f <- system.file("exdata/test.tif", package="terra") r <- rast(f) s <- sampleRegular(r, 1000) # }
Run the code above in your browser using DataLab