View source: R/Random_Stratified_Min_Dist.R
| Random_Stratified_Min_Dist | R Documentation | 
Stratify a raster Stack into the best fitting classes
Random_Stratified_Min_Dist(
  ClassRaster = NULL,
  MinDist = NULL,
  BorderDist = NULL,
  n = NULL,
  n_to_test = 100
)
ClassRaster | 
 a raster with the classes of your site as integers.  | 
MinDist | 
 Minimum distance of a random point to the sampling points and cells with other classes.  | 
BorderDist | 
 Minumum distance of a random point to the border of its class, if NULL if reverst to MinDist.  | 
n | 
 Number of points per class can be one number or a vector specifying de number per class.  | 
n_to_test | 
 Number of points to test for the minimum distance.  | 
An sf with the points and their classes
data(Bios)
library(terra)
Bios <- terra::unwrap(Bios)
a <- Stratify(Bios)
plot(a$FinalStack, colNA = "black")
FinalRaster <- a$FinalStack
Points <- Random_Stratified_Min_Dist(ClassRaster = FinalRaster,
                                     MinDist = 2000,
                                     n = 30,
                                     n_to_test = 100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.