OccurrenceManagement: Manage and environmentally filter occurrence points

View source: R/OccurrenceManagement.R

OccurrenceManagementR Documentation

Manage and environmentally filter occurrence points

Description

This function takes a set of occurrence points (whether downloaded from GBIF using OccurrenceCollection or provided by the user), standardizes the column headings for effective use in species distribution modelling, and, if requested, extracts the values of each environmental variable used in the modelling for each point and environmentally subsamples the data using the method developed by Varela et al. (2014).

Usage

OccurrenceManagement(
  occlist,
  output,
  envextract = FALSE,
  envsample = FALSE,
  envdata,
  nbins = 25,
  PCA = "Y"
)

Arguments

occlist

a list of .csv file names, each containing the occurrence points of a given taxon. The files should be named the same as the taxon of interest (e.g.,: ".../Canis_lupus.csv"). The occurrence points should be given in latlong coordinates (-90 to 90, -180 to 180).

output

the directory where the managed occurrence points will be placed.

envextract

(logical (TRUE or FALSE)) should the environments at each occurrence point be extracted?

envsample

(logical (TRUE or FALSE)) should environmental (Varela) subsampling be conducted on the occurrence points?

envdata

a SpatRaster or list of raster files corresponding to the area the model will be trained on. All environmental variables should be provided.

nbins

(integer) the number of bins each climate combination will be placed in for Varela subsampling of occurrence points. See Varela et al. (2014) and Castellanos et al. (2018) for discussion on this method. Default is 25 bins.

PCA

(optional). The number of PC axes to use when binning climate data for environmental subsampling. Can be a number from 1 to the number of environmental variables. Default selects the number of axes that account for 95% of the environmental variation. If set to NA, PCA will not be run (for use when there are categorical variables, for instance).

Value

a set of .csv files of occurrence points in the directory indicated by the output argument with columns relating to the species name, the coordinates (in the projection of the training area rasters), and the value of each environmental layer at each point.


brshipley/megaSDM documentation built on Nov. 26, 2024, 6:08 a.m.