if (FALSE) {
#--- Load strata raster and existing samples---#
r <- system.file("extdata", "sraster.tif", package = "sgsR")
sr <- terra::rast(r)
e <- system.file("extdata", "existing.shp", package = "sgsR")
e <- sf::st_read(e)
#--- proportional allocation ---#
calculate_allocation(
sraster = sr,
nSamp = 10,
allocation = "prop"
)
}
Run the code above in your browser using DataLab