View source: R/sample_region_slice.R
sample_region_slice | R Documentation |
This function samples points from a region time slice (i.e. a time point).
sample_region_slice(x, size, method = "random", replace = FALSE, na.rm = TRUE)
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 |
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
).
a data.frame with the sampled cells and their respective values for the climate variables.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.