sample_rs_fixed: Sample the same locations from a region time series

View source: R/sample_region_series.R

sample_rs_fixedR Documentation

Sample the same locations from a region time series

Description

Internal function for fixed sampling from sample_region_series(), used when a single size is given.

Usage

sample_rs_fixed(x, size, method = "random", replace = FALSE, na.rm = TRUE)

Arguments

x

a terra::SpatRasterDataset returned by region_series()

size

number of points sampled; the same locations across all time steps

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

Value

a data.frame with the sampled cells and their respective values for the climate variables.


EvolEcolGroup/pastclim documentation built on Nov. 8, 2024, 5:21 a.m.