This is the function implementing the stratified random sampling approach
1 2 3 4 5 6 7 8 9 10 11 12 | sampleCells(
strata_layer,
matrix_strata,
existing_sample,
toSample,
mindist,
message = TRUE,
wrow = 3,
wcol = 3,
checkStrataMatrix = TRUE,
checkStrataRaster = FALSE
)
|
strata_layer |
RasterLayer. A layer of candidates cells that can be sampled. The value of each cell should be the strata ID |
matrix_strata |
A matrix obtained from the getPCAstrata function |
existing_sample |
Optional. A data.frame with a column strata, a column x and a column y giving the XY coordinates of sampled cells centroids or existing plots. |
toSample |
A data.frame with the first column refering to strat ID and second column the number of cells to sample in each strata |
mindist |
Minimum distance between sampled cells |
message |
Logical. Should messages be printed to console while the function is running |
wrow |
Number of row in the focal window (default is 3) |
wcol |
Number of columns in the focal window (default is 3) |
checkStrataMatrix |
Logical. If TRUE, will calculate unique values of strata layer and will check if they match the ones provided in toSample. Default is FALSE |
checkStrataRaster |
Logical. If TRUE, will calculate unique values of strata layer and will check if they match the ones provided in toSample. Default is FALSE |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.