minosse: A ready to use function to compute species geographic range...

View source: R/minosse.R

minosseR Documentation

A ready to use function to compute species geographic range with default settings

Description

This function performs minosse.data and minosse.target all at once for one or multiple target species.

Usage

minosse(dat,species.name=NULL,domain=NULL,time.overlap=0.95,
coc_by="locality",min.occs=10,min.bkg=100,sampling.by.distance=TRUE,
n.sims=10,n.clusters=NULL,n.sims.clusters=NULL,prediction.ground=NULL,
abiotic.covs=NULL,combine.covs=FALSE,reduce_covs_by="pca",covs_th=0.95,c.size="mean",crop.by.mcp=FALSE,constrain.predictors=FALSE,
temporal.tolerance=NULL,projection=NULL,lon_0=NULL,lat_0=NULL,seed=NULL)

Arguments

dat

A n x m dataframe where n are the single occurrences and m are the following columns: spec (the species name), x and y (longitude and latitude in decimal degrees, respectively) and loc_id (an id identifying the fossil locality).

species.name

The character vector of the species names whose geographic ranges are to be estimated. If NULL, minosse runs for all the species in the fossil dataset.

domain

Character or NULL. Only used if no prediction ground is provided. If set as "land", then present day mainland portions are selected according to fossil data spatial distribution, if "sea", marine domain portion is used as prediction ground. Default NULL.

time.overlap

Numeric. The proportion of temporal intersection between the targer and the predictors' time span. Default is 0.95.

coc_by

Character. This argument enables the cooccurrence analysis performed either at the locality level (then use "locality") or at cell of the prediction ground level (then use "cell"). See details below.

min.occs

Numeric. For both target and predictor species. The number occurrences below which minosse.data discards a species from being a valid target or elegible predictors. Default 10.

min.bkg

Numeric. minosse function by default simulates as many pseudo absences as the presences, thereby this is the minimum number of pseudo absences to simulate if a species occurrence number is below this value.

sampling.by.distance

Logical. If TRUE pseudo absences are simulated with an intensity proportional to the distance to the presence data. If FALSE a pure spatial random distribution is simulated.

n.sims

Numeric or NULL. The number of pseudo absences simulations (see details).

n.clusters

Numeric or NULL. The number of cores to use during spatial interpolations. If "automatic", the number of used cores is equal to the number of predictors. If predictors' number > the avaialble cores, all cores - 1 is then used. Default is NULL.

n.sims.clusters

Numeric or NULL. The number of machine cores to use when setting multiple pseudo absences simulations. By setting "automatic", as many cores are used as the number of simulations. In the case number of simulations is higher than the available cores, then the number of cores = available cores -1. Default NULL.

prediction.ground

Either a raster or a SpatialPolygons class object where to perform all the spatial interpolations. This will be the prediction ground used when running minosse.target.

abiotic.covs

The raster or rasters' stack of additional environmental predictors.

combine.covs

Logical. Should minosse.data collate species and abiotic predictors when performing variables' number reduction? Default FALSE. See details.

crop.by.mcp

Logical. If TRUE, the interpoalation of the predictors species data are limited to the prediction.grund area delimited by the MCP of ALL the fossil occurrences. Default FALSE.

constrain.predictors

Logical. Removing from the predictors' record all the localities not complying with spatial and temporal restrictions? Default is FALSE. See minosse.data function details.

temporal.tolerance

Numeric. If constrain.predictors is TRUE this is the maximum difference (expressed in Million years unit, i.e. 0.1 = one kylo years) allowed between target and predictors species' age estimate of the localites. See minosse.data function details.

projection

Character. This argument works only if prediction.ground is NULL. This is the euqual-area projection for spatial interpolations. A character string in the proj4 format or either "moll" (Mollweide) or "laea" (Lambert Azimuthal equal area) projections (see details in minosse.data function).

lon_0

Numeric. Only if prediction.ground is NULL. The longitude of the projection centre used when setting either "moll" or "laea" projections. If NULL the mean longitude of the whole fossil record is used. Default NULL.

lat_0

Numeric. Only if prediction.ground is NULL. The latitude of the projection centre used when setting "laea" projection. If NULL the mean latitude of whole fossil record is used. Default NULL.

seed

Numeric. The seed number for experiment replication.

Value

A list of three objects where the first one is the polygon of the target species geographic range (a SpatialPolygons object), the second element is the output of minosse.target function (see minosse.target function for details) and the last one is the result (if available) of the cooccurrence analysis. If minosse function is performed for multiple species all at once, then minosse output described above is replicated for each target species.

Author(s)

Francesco Carotenuto, francesco.carotenuto@unina.it

Examples

  ## Not run: 
  library(raster)
  data(lgm)
  raster(system.file("exdata/prediction_ground.gri", package="EcoPast"))->prediction_ground

  mam<-minosse(dat=lgm,species.name="Mammuthus_primigenius",domain=NULL,
  time.overlap=0.95,prediction.ground=prediction_ground,crop.by.mcp=FALSE,
  coc_by="locality",min.occs=3,min.bkg=100,sampling.by.distance=TRUE,
  constrain.predictors=FALSE, temporal.tolerance=NULL,n.sims=10,n.clusters=NULL,
  n.sims.clusters=NULL,projection="laea",lon_0 = NULL,lat_0 = NULL,seed=625)

  
## End(Not run)

francesco-carotenuto/EcoPast documentation built on April 16, 2023, 5:48 p.m.