Learn R Programming

phyloregion

An R package for biogeographic regionalization (the classification of geographical areas in terms of their biotas) and macroecology. With macroecological datasets of ever increasing size and complexity, phyloregion offers the possibility of handling and executing very large scale analysis of biogeographic regionalization. It also allows fast and memory efficient analysis of standard conservation measures such as phylogenetic diversity, phylogenetic endemism, evolutionary distinctiveness and global endangerment. phyloregion can run on any operating system (Mac, Linux, Windows or even high performance computing cluster) with R 3.6.0 (or higher) installed.

How to cite

The original implementation of phyloregion is described in:

Daru, B.H., Karunarathne, P. & Schliep, K. (2020) phyloregion: R package for biogeographic regionalization and macroecology. Methods in Ecology and Evolution 11: 1483-1491. doi: 10.1111/2041-210X.13478.

It is based on the method described in:

Daru, B.H., Farooq, H., Antonelli, A. & Faurby, S. (2020) Endemism patterns are scale dependent. Nature Communications 11: 2115 doi: 10.1038/s41467-020-15921-6.

The original conceptual is described in:

Daru, B.H., Elliott, T.L., Park, D.S. & Davies, T.J. (2017) Understanding the processes underpinning patterns of phylogenetic regionalization. Trends in Ecology & Evolution 32: 845-860. doi: 10.1016/j.tree.2017.08.013

Installation

phyloregion is available from the Comprehensive R Archive Network, so you can use the following line of code to install and run it:

install.packages("phyloregion")

Alternatively, you can install the development version of phyloregion hosted on GitHub. To do this, you will need to install the devtools package. In R, type:

if (!requireNamespace("devtools", quietly = TRUE)) 
    install.packages("devtools") 
devtools::install_github("darunabas/phyloregion")

Feedback

If you have any questions, suggestions or issues regarding the package, please add them to GitHub issues

License

The license for phyloregion is similar to that of the package on CRAN:

License: AGPL-3

The AGPL-3 license can be found at: https://cran.r-project.org/web/licenses/AGPL-3

Copy Link

Version

Install

install.packages('phyloregion')

Monthly Downloads

640

Version

2.1.0

License

AGPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Barnabas H. Daru

Last Published

November 14th, 2026

Functions in phyloregion (2.1.0)

phylo_endemism

Phylogenetic Endemism
optimal_phyloregion

Determine optimal number of clusters
map_trait

Map species' trait values in geographic space
random_species

Generate random species distributions in space
plot.phyloregion

Visualize biogeographic patterns
phylobeta_ses

Phylogenetic beta diversity standardized for species beta diversity
phyloregion

Compute phylogenetic regionalization and evolutionary distinctiveness of phyloregions
phylobeta_core

Phylogenetic beta diversity
match_phylo_comm

Match taxa and in phylogeny and community matrix
plot_spatial_membership

Visualize spatial memberships
phyloregion-package

Biogeographic regionalization and macroecology
plot.sparse

Create illustrative sparse matrix
sdm

Fast species distribution model
unifrac

UniFrac distance
reexports

Objects exported from other packages
fishnet

Create fishnet of regular grids
phylobuilder

Create a subtree with largest overlap from a species list.
timeslice

Slice phylogenetic tree at various time depths
rast2comm

Convert raw input distribution data to community
nodepie

Label phylogenetic nodes using pie
mean_dist

Mean distance matrix from a set of distance matrices
rast_quantile

Standardizes raster values for mapping
selectbylocation

Select polygon features from another layer and adds polygon attributes to layer
read.community

Read in sparse community matrices
select_linkage

Cluster algorithm selection and validation
tpd_groups

Global trait spectra of groups of species
tree_sampler

Subset trees from posterior distribution of trees.
weighted_endemism

Measure the distribution of narrow-ranged or endemic species.
tpd_beta_core

Functional beta diversity using trait probability densities
tpd_extinction

Simulated extinctions and the loss of functional diversity
tpd_alpha

Functional alpha diversity using trait probability densities
backg

Sample background points
africa

Plants of southern Africa
beta_core

Taxonomic (non-phylogenetic) beta diversity
arc_labels

Add arc labels to plotted phylogeny
PD_ses

Phylogenetic diversity standardized for species richness
EDGE

Evolutionary Distinctiveness and Global Endangerment
collapse_range

Collapse nodes and ranges based on divergence times
evol_distinct

Species' evolutionary distinctiveness
dirpath

Get current directory
choropleth

Bin values
fitgom

Fits Grade of membership models for biogeographic regionalization
coldspots

Computes biodiversity coldspots and hotspots
hexcols

Generate diverging colors in HCL colour space.
indicators

Top driving species in phyloregions
long2sparse

Conversion of community data
PD

Phylogenetic diversity
counts

Phyloregions for functional traits and phylogeny
get_clades

Get descendant nodes of phylogeny at a given time depth
functional_beta

Functional beta diversity for mixed-type functional traits