sample_background: Create sample of background points.

Description Usage Arguments Value

View source: R/sample_background.R

Description

Create sample of background points.

Usage

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")

Arguments

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.

Value

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.


juoe/sdmflow documentation built on Feb. 23, 2020, 7:38 p.m.