calculate_coobs {sgsR} | R Documentation |
coobs algorithm sampling
Description
Perform the COunt of OBServations (coobs) algorithm using existing site data and raster metrics. This algorithm aids the user in determining where additional samples could be located by comparing existing samples to each pixel and associated covariates. The output coobs raster could be used to constrain clhs sampling to areas that are underreprented.
Usage
calculate_coobs(
mraster,
existing,
cores = 1,
threshold = 0.95,
plot = FALSE,
filename = NULL,
overwrite = FALSE
)
Arguments
mraster |
spatRaster. ALS metrics raster. Requires at least 2 layers to calculate covariance matrix. |
existing |
sf 'POINT'. Existing plot network. |
cores |
Numeric. Number of cores to use for parallel processing. |
threshold |
Numeric. Proxy maximum pixel quantile to avoid outliers. |
plot |
Logical. Plots output strata raster and visualized strata with boundary dividers. |
filename |
Character. Path to write stratified raster to disc. |
overwrite |
Logical. Specify whether |
Value
Output raster with coobs and classified coobs layers.
Note
Special thanks to Dr. Brendan Malone for the original implementation of this algorithm.
Author(s)
Tristan R.H. Goodbody
References
Malone BP, Minasny B, Brungard C. 2019. Some methods to improve the utility of conditioned Latin hypercube sampling. PeerJ 7:e6451 DOI 10.7717/peerj.6451
See Also
Other calculate functions:
calculate_allocation()
,
calculate_allocation_existing()
,
calculate_distance()
,
calculate_pcomp()
,
calculate_pop()
,
calculate_representation()
,
calculate_sampsize()
Examples
## Not run:
#--- Load raster and existing plots---#
r <- system.file("extdata", "mraster.tif", package = "sgsR")
mr <- terra::rast(r)
e <- system.file("extdata", "existing.shp", package = "sgsR")
e <- sf::st_read(e)
calculate_coobs(
mraster = mr,
existing = e,
cores = 4
)
## End(Not run)