This function samples points from a region time slice (i.e. a time point).
Arguments
- x
a
terra::SpatRasterreturned byregion_slice()- size
number of points sampled.
- method
one of the sampling methods from
terra::spatSample(). It defaults to "random"- replace
boolean determining whether we sample with replacement
- na.rm
boolean determining whether NAs are removed
Details
This function wraps terra::spatSample() to appropriate sample the
terra::SpatRaster returned
by region_slice(). You can also use terra::spatSample() directly
on a slice (which is a standard terra::SpatRaster).
