Generates background sample as null for species distribution modeling and other things.
Sample random background points using a vector of probability weights.
backg(calib, spatkde, size = 10000, ...)
randpoints(ras, size, prob = NULL, ...)
A SpatRaster of the species calibration area. If a polygon, convert to SpatRaster using rasterize.
A weighted or unweighted Gaussian Kernel Density estimate (KDE) for all input occurrence records.
An positive integer of the number of samples to generate.
further arguments passed to or from other methods.
Input SpatRaster
Vector of probability weights for obtaining the points sampled.
A dataframe containing the generated background points.
A dataframe with sampled points.