dsp_create_from_gdb: Create dispersion fields and a presence absence matrix from...

Description Usage Arguments Value

View source: R/dsp_create_from_gdb.R

Description

Reads a single GIS data file and generates a presence-matrix and associated dispersion fields in a user-specified region.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
dsp_create_from_gdb(
  gdb_object,
  raster_resolution = 5,
  thresh = 4,
  raster_latlim = c(-90, 90),
  raster_longlim = c(-180, 180),
  species_feature = "SCINAME",
  precision = 0.25,
  species_names = NULL,
  drop = FALSE
)

Arguments

gdb_object

The geodatabase or a single shapefile containing all species to be read in ahead of time and provided as an sf object.

raster_resolution

The resolution of the raster in degrees.

thresh

The number of co-occuring species required to generate a dispersion field for that map cell.

raster_latlim

The latitudinal range of the desired dispersion fields and presence-absence matrix.

raster_longlim

The longitudinal range.

species_feature

The name of the feature (column) that contains the species names in the GIS data source.

precision

The precision of the initial estimation provided to fasterize. fasterize tends to undercount small species ranges, so is required to keep at a low value in order detect species presences. Most users will not need to change, but increaseing this value will speed up the function but with potential for error.

species_names

If you would like to only include a subset of the species is the GIS data source a vector of species names can be provided to filter the GIS data before processing into a presence absence matrix and dispersion fields.

drop

Boolean. If T sites with 0 overlapping species will be dropped from the final presence-absence matrix. Defaults to false.

Value

Returns 2 lists and 1 matrix. In each list, each element is a dispersion field corresponding to the species present in the specific site to which it corresponds. The first list "matrix" contains each dispersion field as a matrix. The second list "raster" returns each dispersion field as a raster. The matrix is a presence absence matrix with species as columns and each individual map cell the rows. The names of the elements of the lists, and the rownames for the presence-absence matrix, are assigned as the lat_long combos for those locations.


kkdey/ecostructure documentation built on Jan. 26, 2021, 4:10 p.m.