epm {epm} | R Documentation |
EcoPhyloMapper (epm)
Description
An R package that facilitates the aggregation of species' geographic ranges from vector or raster spatial data, and that enables the calculation of various morphological and phylogenetic metacommunity metrics across geography.
A detailed wiki for the R package can be found on the epm github page: https://github.com/ptitle/epm/wiki#table-of-contents
To cite the epm package in publications, please use:
Pascal O. Title, Donald L. Swiderski and Miriam L. Zelditch. 2022. EcoPhyloMapper:
an R package for integrating geographic ranges, phylogeny, and morphology. Methods
in Ecology and Evolution. doi:10.1111/2041-210X.13914
Details
Creating and enhancing an epmGrid object
Use createEPMgrid
to create an epmGrid object from species spatial data.
Optionally, you can draw the spatial extent that you would like to use with interactiveExtent
.
Add in species attributes with addTraits
, and/or a phylogeny with addPhylo
.
Use the function reduceToCommonTaxa
to reduce the epmGrid object to species that are present for all data types.
Calculating diversity metrics
Calculate various diversity metrics with gridMetrics
, or define your own, using customGridMetric
.
Calculate moving window turnover metrics with betadiv_taxonomic
, betadiv_phylogenetic
, betadiv_disparity
. You can also define your own beta diversity metric with customBetaDiv
.
If you have a posterior set of trees, summarize phylogenetic uncertainty with summarizeEpmGridList
.
Plotting epmGrid objects
Plot epmGrid object with plot.epmGrid
.
You get finer control over the legend with addLegend
.
The function getMultiMapRamp
will be helpful if you are trying to plot multiple epmGrid objects on the same color scale.
Use plotDispersionField
to plot the assemblage dispersion field for a given site.
Getting derived data from epmGrid objects
Use calcMeanShape
to get mean morphological shape per grid cell.
Use coordsFromEpmGrid
to get the spatial coordinates of specific grid cells.
Use extractFromEpmGrid
to get the species that are found at certain coordinates or within a defined polygon.
Use generateOccurrenceMatrix
to produce a species-by-site presence/absence matrix.
Use tableFromEpmGrid
to pull data from epmGrids and rasters from a set of random points for statistical analysis.
Writing to disk
You can save an epmGrid with write.epmGrid
, and read it back in with read.epmGrid
.
You can also write an epmGrid object to a spatial file format for use in GIS software with writeEpmSpatial
.
Author(s)
Pascal O. Title, Donald L. Swiderski, Miriam L. Zelditch