{
# load in sample data
library(S4DM)
library(terra)
library(sf)
# occurrence points
data("sample_points")
occurrences <- sample_points
occurrences <- st_as_sf(x = occurrences,coords = c(1,2))
manual <- stratify_spatial(occurrence_sf = occurrences,nfolds = 5,nsubclusters = 5)
default <- stratify_spatial(occurrence_sf = occurrences)
}
Run the code above in your browser using DataLab