backg: Sample background points

View source: R/background.R

backgR Documentation

Sample background points

Description

Generates background sample as null for species distribution modeling and other things.

Sample random background points using a vector of probability weights.

Usage

backg(calib, spatkde, size = 10000, ...)

randpoints(ras, size, prob = NULL, ...)

Arguments

calib

A SpatRaster of the species calibration area. If a polygon, convert to SpatRaster using rasterize.

spatkde

A weighted or unweighted Gaussian Kernel Density estimate (KDE) for all input occurrence records.

size

An positive integer of the number of samples to generate.

...

further arguments passed to or from other methods.

ras

Input SpatRaster

prob

Vector of probability weights for obtaining the points sampled.

Value

A dataframe containing the generated background points.

A dataframe with sampled points.


darunabas/phyloregion documentation built on Oct. 27, 2024, 10:01 p.m.