View source: R/BackgroundBuffers.R
BackgroundBuffers | R Documentation |
This function takes a list of occurrence point files and generates buffer shapefiles
around each set of points. These buffers will be used if spatially-constrained background
points are required. The radius of the buffer can be defined as a single value for all
species or as a distinct value for each species. If no radius values are given, the
distances between the occurrence points themselves inform the buffer radius (see buff_distance
).
BackgroundBuffers(occlist, envdata, output, buff_distance = NA, ncores = 1)
occlist |
a list of .csv files containing the occurrence points for all species
intending to be modelled. Either the complete occurrence data or the subsampled data
may be used although results may vary depending on which data set is used. The files
should be named the same as the taxon of interest (e.g.,: ".../Canis_lupus.csv"), and
should be in the same coordinate reference system as the projected environmental data
(see |
envdata |
a SpatRaster or list of raster files corresponding to the training region (the region the SDM model(s) will be trained on). This provides the CRS arguments to project the created buffer shapefiles. |
output |
the full path to the directory where the buffer shapefiles will be written out to. It is recommended that this is a unique directory from the one background points will be written to. |
buff_distance |
how wide should the buffers be around the occurrence points? If a single
number is given, buffers for all species will have a radius of that number in map units.
Buffers for longlat projection should be given in meters. If you are unsure what spatial units the
data have, run |
ncores |
the number of computer cores to parallelize the background point generation on. Default is 1; Using one fewer core than the computer has is usually optimal. |
shapefiles (.shp) that are buffers around the occurrence points of each species
are written out to the directory indicated by the output
argument. Also prints a .csv file for each
species containing the width of the buffer in the projection units.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.