Description Usage Arguments Value
View source: R/sample_background.R
Create sample of background points.
1 2 3 4 5 6 7 8 9 | sample_background(x, method = "mcp", ...)
sample_background_bb(x, n = nrow(x), occ_col = "occ")
sample_background_mcp(x, n_frac = 1, n_abs = NULL, percentile = 100,
ind_col = NULL, occ_col = "occ")
sample_background_target(x, y, n_frac = 1, n_abs = NULL,
ind_col = NULL, occ_col = "occ")
|
x |
An sf object containing the modeling data. |
method |
"mcp" or "bb" |
... |
Arguments passed on to the sample functions. |
n |
Number of background points created. |
occ_col |
Name of the occurence (presence / absence) column. Will be created if not available yet. |
n_frac |
Fraction of background samples compared to presence samples. |
n_abs |
Absolute number of background samples. Instead used of n_frac if this argument is not NULL. |
percentile |
Percentile number used for the creation of the minimum convex polygon (MCP) in which background points are sampled. |
ind_col |
Default is NULL. Can be used to specify column name identifying groups / clusters in the presence observations (e.g. individuals). Then, MCPs are calculated on a cluster-level and background points are sampled separately for each cluster. |
An sf object with an additional n / nrow(x)*n_frac rows containing the background points. The feature values for the background samples will be sampled randomly from the presence samples.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.