load_occ: Load occurrence data

View source: R/load_occ.R

load_occR Documentation

Load occurrence data

Description

Load occurrence data from CSV file to perform modelling, ensemble_modelling or stack_modelling.

Usage

load_occ(
  path = getwd(),
  Env,
  file = NULL,
  ...,
  Xcol = "Longitude",
  Ycol = "Latitude",
  Spcol = NULL,
  GeoRes = TRUE,
  reso = max(res(Env@layers[[1]])),
  verbose = TRUE,
  GUI = FALSE
)

Arguments

path

character. Path to the directory that contains the occurrence table.

Env

raster stack. Environmental variables in the form of a raster stack used to perform spatial thinning (can be the result of the load_var function).

file

character. File containing the occurrence table, if NULL (default) the .csv file located in the path will be loaded.

...

additional parameters given to read.csv.

Xcol

character. Name of the Latitude or X coordinate variable.

Ycol

character. Name of the Longitude or Y coordinate variable.

Spcol

character. Name of the column containing species names or IDs.

GeoRes

logical. If TRUE, performs geographical thinning on occurrences to limit geographical biases in the SDMs.

reso

numeric. Resolution used to perform the geographical thinning, default is the resolution of Env.

verbose

logical. If TRUE, allows the function to print text in the console.

GUI

logical. Parameter reserved for graphical interface.

Value

A data frame containing the occurrence dataset (spatially thinned or not).

See Also

load_var to load environmental variables.

Examples


## Not run: 
load_occ(path = system.file('extdata',  package = 'SSDM'), Env,
         Xcol = 'LONGITUDE', Ycol = 'LATITUDE',
         file = 'Occurrences.csv', sep = ',')

## End(Not run)


SSDM documentation built on Oct. 24, 2023, 5:08 p.m.