generate_pseudo_absences: Generate Pseudo-Absence Points Using Different Methods Based...

View source: R/generate_pseudo_absences.R

generate_pseudo_absencesR Documentation

Generate Pseudo-Absence Points Using Different Methods Based on Presence Points, Covariates, and Study Area Polygon

Description

Wrapper function for pseudo-absence generation methods, such as background random points, target-group, and using buffer area.

Usage

generate_pseudo_absences(
  method = c("random", "target_group", "buffer_out"),
  presences,
  raster_stack,
  predictor_variables,
  study_area = NULL,
  target_group_points = NULL,
  coords = c("decimalLongitude", "decimalLatitude"),
  pa_buffer_distance = 0.5,
  ratio = 1,
  attempts = 100,
  seed = NULL
)

Arguments

method

Character; one of "random", "target_group", or "buffer_out".

presences

Data frame of presence points with coordinates and timestamp.

raster_stack

SpatRaster of covariates.

predictor_variables

Character vector of selected predictors.

study_area

Optional sf polygon (used for clipping).

target_group_points

Optional data frame of sampling points (for target-group).

coords

Vector of coordinate column names.

pa_buffer_distance

Numeric; buffer radius in degrees around each presence. Default is 0.5.

ratio

Ratio of pseudo-absences to presences.

attempts

Max attempts to fulfill sample size.

seed

Optional seed for reproducibility.

Value

A data frame of pseudo-absence points (pa = 0) with covariates.


glossa documentation built on June 8, 2025, 1:20 p.m.