# Analysis of Niche Evolution using Niche and Distribution Models

## Documentation for package ‘ENMTools’ version 1.1.2

- DESCRIPTION file.
- Package NEWS.

## Help Pages

add.env | Takes an enmtools.species object and a set of environment layers, and adds the environmental predictor values to the occurrence data. Typically not called by the user directly. Code modified from Elith and Hijmans SDM with R tutorial
assert.extras | Assert that the extra packages needed for an ENMTools function are installed and available
background.buffer | Takes a set of points, a buffer radius, a buffer type, and a mask and returns either a raster, a polygon, or background points representing the species background. Code modified from Elith and Hijmans SDM with R tutorial
background.points.buffer | Takes a set of points, a buffer radius, a sample size, and a mask and returns randomly sampled points from within that buffer radius. Code modified from Elith and Hijmans SDM with R tutorial
background.raster.buffer | Takes a set of points, a buffer radius, and a mask and returns a raster based on that buffer radius. Code modified from Elith and Hijmans SDM with R tutorial
background.shape.buffer | Takes a set of points and a buffer radius, and returns a polygon. Code modified from Elith and Hijmans SDM with R tutorial
background.test | background.test Conduct a background test (also called a similarity test), as described in Warren et al. 2008. This test can either be run as an asymmetric test (species.1 vs background of species.2) or as a symmetric test (background of species.1 vs background of species.2). For GLM, Bioclim, and Domain models the replicates will be constructed from the background points supplied for each species. For Maxent, the replicates will be constructed from the range rasters stored in the enmtools.species objects.
calc.B1 | calc.B1, Calculates standardized version of Levins (1968) B1 measure of niche breadth given a vector of suitabilities
calc.B2 | calc.B2, Calculates standardized version of Levins (1968) B2 measure of niche breadth given a vector of suitabilities
check.bg | Takes an emtools.species object and adds background points if they're missing. Looks for range raster first, then goes for environmental layers.
check.clade | Checking for complians of an enmtools.clade object
check.env | Automating some basic tasks for using a raster stack for modeling. Checks rasters for same extent and resolution, and sets values in each layer to NA if there is an NA in any other layer.
check.extras | Check that the extra packages needed for an ENMTools function are installed and available
check.species | Checking compliance for an object of class enmtools.species.
clamp.env | Takes an emtools.model object and a set of environment layers and clamps the environment layers so that no variable falls outside of the range available in the training data.
combine.species | Takes a list of enmtools.species objects and combines them into a single enmtools.species object
drop.species | Takes a an ENMTools clade object and a vector of species names. Drops the species from the tree and removes data from the clade object.
enmtools.aoc | Takes an overlap matrix and a tree and runs permutation tests to determine the statistical significance of the relationship between overlap and time
enmtools.bc | Takes an emtools.species object with presence and background points, and builds a Bioclim model
enmtools.calibrate | Takes an emtools.model object, and reformats it to run through the CalibratR package, calculates Continuous Boyce Index, and runs a Hosmer-Lemeshow goodness-of-fit test. Can either do a full CalibratR run or just return ECE/MCE statistics and plots.
enmtools.clade | Defining a class for enmtools.clade. Each clade gets:
enmtools.dm | Takes an emtools.species object with presence and background points, and builds a Domain model
enmtools.ecospat.bg | enmtools.ecospat.bg, Runs an ecospat background/similarity test using enmtool.species objects.
enmtools.ecospat.id | enmtools.ecospat.id, Runs an ecospat identity test using enmtool.species objects.
enmtools.gam | Takes an emtools.species object with presence and background points, and builds a gam
enmtools.glm | Takes an enmtools.species object with presence and background points, and builds a GLM
enmtools.hypervolume | THIS FUNCTION IS CURRENTLY DISABLED. Takes an emtools.species object and environmental layers, and constructs a hypervolume using the R package hypervolume
enmtools.maxent | Takes an emtools.species object with presence and background points, and builds a maxent model
enmtools.rf | Takes an emtools.species object with presence and background points, and builds a random forest model
enmtools.rf.ranger | Takes an emtools.species object with presence and background points, and builds a random forest model using the 'probability mode' in package 'ranger'
enmtools.species | Defining a class for enmtools.species.
enmtools.vip | Takes an enmtools.model object, and performs variable importance analyses on it using methods from the vip package
env.breadth | Calculates breadth of a model in environment space using latin hypercube sampling
env.evaluate | Calculates evaluation metrics (AUC, etc.) using latin hypercube sampling in environment space
env.overlap | Calculates overlap between models in environment space using latin hypercube sampling
euro.worldclim | Worldclim data for Europe
find.extras | Find the extra packages needed for an ENMTools function
find.extras.missing | Find the extra packages needed for an ENMTools function that are currently missing (not available)
geog.range.overlap | Takes two emtools.species objects with range rasters, calculates overlap between them as in Fitzpatrick and Turelli 2006. This metric divides the area of overlap between two species ranges by the smaller of the two areas of the species' individual ranges. It therefore ranges from 0 (no overlap) to 1 (ranges are the same or the smaller species' range is contained entirely within the larger).
hypervolume.overlap | Takes an emtools.species object and environmental layers, and constructs a hypervolume using the R package hypervolume
iberolacerta.clade | GBIF data for a clade of Iberolacerta lizards from spain
identity.test | identity.test Conduct a niche identity/equivalency test as described in Warren et al. 2008.
install.extras | install.extras
interactive.plot | Generic function for making interactive plots of ENMTools models and species
interactive.plot.enmtools.model | Plot an enmtools.model object on an interactive map
interactive.plot.enmtools.species | Plot an enmtools.species object on an interactive map
load.enmtools.clade | Defining a class for enmtools.clade. Each clade gets:
load.enmtools.species | Defining a class for enmtools.species.
marginal.plots | marginal.plots Plots the marginal response of a model to an environmental variable with all other variables held at their mean in env
moses.list | Takes a list of enmtools.species objects and uses model selection to ask whether they're better treated jointly or separately
multistack.pca | multistack.pca, simultaneous PCA on more than one stack of environmental rasters
node.overlap | Takes an overlap matrix and a tree and returns average overlap at nodes using Fitzpatrick & Turelli averaging method. Typicall called via enmtools.aoc rather than used directly.
point.overlap | Takes two emtools.species objects with range rasters, calculates overlap between them as in Cardillo and Warren 2016
rangebreak.blob | rangebreak.blob Conduct a blob rangebreak test as described in Glor and Warren 2011.
rangebreak.linear | rangebreak.linear Conduct a linear rangebreak test as described in Glor and Warren 2011.
rangebreak.ribbon | rangebreak.ribbon Conduct a ribbon rangebreak test as described in Glor and Warren 2011.
raster.breadth | raster.breadth, applies measures of niche breadth to an ENM
raster.cor | Calculates the correlation coefficient between two rasters.
raster.cor.matrix | Takes a raster stack and returns a data frame containing Pearson correlation coefficients between the included rasters
raster.cor.plot | Takes a raster stack and returns a data frame containing Pearson correlation coefficients between the included rasters
raster.overlap | raster.overlap, measures overlap between two ENMs
raster.pca | raster.pca, PCA on a set of environmental rasters
raster.resid | raster.resid Measure standardized residuals from a linear regression between two rasters.
raster.standardize | raster.standardize, standardizes all values in a raster file
rasterToPoints2 | get terra to produce same output as raster::rasterToPoints
save.enmtools.clade | Defining a class for enmtools.clade. Each clade gets:
save.enmtools.species | Defining a class for enmtools.species.
sim.points | Simulate a point process from an enmtools.model object
species.from.file | Takes a csv file and uses it to construct one or more enmtools.species objects. It constructs one object per unique value in the "species.col" column.
threespace.plot | threespace.plot, A plot that compares the environmental distribution of presence points, background points, and the set of supplied environmental layers.
trimdupes.by.raster | Takes a set of points and a raster mask and returns a data frame trimmed so that only one point is returned per grid cell in the mask raster.
unwrap_list | export
visualize.enm | visualize.enm, Makes a heatmap of suitability of habitat in environment space according to a given model
visualize.overlap | visualize.overlap, Makes a contour map of suitability of habitat in environment space for two models
wrap_list | export