
Last chance! 50% off unlimited learning
Sale ends in
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
SpatRaster
# 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