We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea77606 commit 7f8317eCopy full SHA for 7f8317e
man/sample.Rd
@@ -33,7 +33,7 @@ In order to assure regularity when requesting a regular sample, the number of ce
33
\item{size}{numeric. The sample size. If \code{x} is a SpatVector, you can also provide a vector of the same length as \code{x} in which case sampling is done separately for each geometry. If \code{x} is a SpatRaster, and you are using \code{method="regular"} you can specify the size as two numbers (number of rows and columns). Note that when using \code{method="stratified"}, the sample size is returned for each stratum}
34
\item{method}{character. Should be "regular" or "random", If \code{x} is a \code{SpatRaster}, it can also be "stratified" (each value in \code{x} is a stratum), "weights" (each value in \code{x} is a probability weight), or "spread" (an approximately regular sample, using compact zones generated with \code{\link{k_means}} clustering of the raster cell locations)}
35
\item{replace}{logical. If \code{TRUE}, sampling is with replacement (if \code{method="random"})}
36
- \item{na.rm}{logical. If \code{TRUE}, \code{NAs} are removed. Only used with random sampling of cell values. That is with \code{method="random", as.raster=FALSE, cells=FALSE}}
+ \item{na.rm}{logical. If \code{TRUE}, \code{NAs} are removed. Not used with \code{method="spread"} or \code{as.raster=TRUE}}
37
\item{as.raster}{logical. If \code{TRUE}, a SpatRaster is returned}
38
\item{as.df}{logical. If \code{TRUE}, a data.frame is returned instead of a matrix}
39
\item{as.points}{logical. If \code{TRUE}, a SpatVector of points is returned}
0 commit comments