View source: R/calculate_coobs.R
calculate_coobs | R Documentation |
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.
calculate_coobs(
mraster,
existing,
cores = 1,
threshold = 0.95,
plot = FALSE,
filename = NULL,
overwrite = FALSE
)
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 |
Output raster with coobs and classified coobs layers.
Special thanks to Dr. Brendan Malone for the original implementation of this algorithm.
Tristan R.H. Goodbody
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
Other calculate functions:
calculate_allocation()
,
calculate_allocation_existing()
,
calculate_distance()
,
calculate_pcomp()
,
calculate_pop()
,
calculate_representation()
,
calculate_sampsize()
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.