Sample points from a region time seriesSource:
This function samples points from a region time series. Sampling can either be
performed for the same locations at all time steps (if only one value is given
size), or for different locations for each time step (if
size is a
vector of length equal to the number of time steps). To sample the same
number of points, but different locations, for each time step, provide a vector
repeating the same value for each time step.
number of points sampled. A single value is used to sample the same locations across all time steps, a vector of values to sample different locations at each time step.
one of the sampling methods from
terra::spatSample(). It defaults to "random"
boolean determining whether we sample with replacement
boolean determining whether NAs are removed