createPresAb: Create pseudo absences and combine with the scheme occurrence...

createPresAbR Documentation

Create pseudo absences and combine with the scheme occurrence data.

Description

This function creates pseudo absences according to the "target group" approach (Phillips 2009). The aim is to generate pseudo absences with similar environmental bias as the occurrence data. Pseudo absences are created for individual species, but the function works at the group level because absences are inferred from the presences of non-focal species in the same group.

Create environmental layers in ascii for a specified region and spatial resolution

Usage

createPresAb(
  inPath,
  taxon,
  species,
  minYear,
  maxYear,
  nAbs,
  matchPres = FALSE,
  recThresh
)

createPresAb(
  inPath,
  taxon,
  species,
  minYear,
  maxYear,
  nAbs,
  matchPres = FALSE,
  recThresh
)

Arguments

inPath

String. Path to species data extracted using extract_records.

taxon

String. Taxonomic group. Must match one of the groups in inPath.

species

String. Focal species' name (must be in chosen taxonomic group)

minYear

Numeric.

maxYear

Numeric. Threshold number of records below which species' are dropped.

nAbs

Numeric. Number of pseudo absences to produce. Note that this is overriden if matchPres = TRUE.

matchPres

Logical. If true, will produce absences such that there are an equal number to presences. Defaults to false

recThresh

Numeric. Lower threshold number of records; species with fewer records are dropped.

dat

String. data.frame with occurrence records for all species in the group of interest. Could be the output of formatData. Must have column names "species", "eastings" and "northings".

matchpres

Logical. If TRUE this overrides nAbs and creates pseudo absences in equal number to the occurrence data.

res

Numeric. Spatial resolution in decimal degrees (defaults to 0.5)

Value

A list with n elements, where n is the number of species in the group. Each element contains two dataframes, one with the coordinates of the presence data, and a second with the coordinates of the pseudo absences. The coordinate reference system is OSGB36.


robboyd/soaR documentation built on April 24, 2022, 9:44 a.m.