% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sample_region_series.R
\name{sample_rs_variable}
\alias{sample_rs_variable}
\title{Sample the different number of points from a region time series}
\usage{
sample_rs_variable(x, size, method = "random", replace = FALSE, na.rm = TRUE)
}
\arguments{
\item{x}{a \code{\link[terra:SpatRaster-class]{terra::SpatRasterDataset}} returned
by \code{\link[=region_series]{region_series()}}}

\item{size}{a vector of the number of points sampled for each time step}

\item{method}{one of the sampling methods from \code{\link[terra:sample]{terra::spatSample()}}. It
defaults to "random"}

\item{replace}{boolean determining whether we sample with replacement}

\item{na.rm}{boolean determining whether NAs are removed}
}
\value{
a data.frame with the sampled cells and their respective values for
the climate variables.
}
\description{
Internal function for sampling different number of points for each
timestep of a region series from \code{\link[=sample_region_series]{sample_region_series()}},
used when size is a vector of values.
}
\keyword{internal}
