| sample_region_slice {pastclim} | R Documentation | 
Sample points from a region time slice
Description
This function samples points from a region time slice (i.e. a time point).
Usage
sample_region_slice(x, size, method = "random", replace = FALSE, na.rm = TRUE)
Arguments
x | 
 a   | 
size | 
 number of points sampled.  | 
method | 
 one of the sampling methods from   | 
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).
Value
a data.frame with the sampled cells and their respective values for the climate variables.
[Package pastclim version 2.1.0 Index]