sampleRastStrat: Sample random points in a stratfied manner from a raster...

View source: R/sampleRastStrat.r

sampleRastStratR Documentation

Sample random points in a stratfied manner from a raster with/out replacement

Description

This function is a robust version of sampleStratified() in the raster package where sampling can be performed with replacement in each stratum. Each unique value in a raster is identified as a stratum. Each stratum is sampled a given number of times.

Usage

sampleRastStrat(x, n, adjArea = TRUE, replace = TRUE)

Arguments

x

Raster* object.

n

number of points to sample from *each* stratum

adjArea

Logical. If TRUE then adjust sample probability of cells by cell area.

replace

Logical. If TRUE then sample with replacement.

Value

2-column matrix with longitude and latitude of random points.

See Also

sampleStratified, randomPoints, sampleRast


adamlilith/enmSdm documentation built on Jan. 6, 2023, 11 a.m.