Learn R Programming

rdiversity: diversity measurement in R

rdiversity is a package for R based around a framework for measuring biodiversity using similarity-sensitive diversity measures. It provides functionality for measuring alpha, beta and gamma diversity of metacommunities (e.g. ecosystems) and their constituent subcommunities, where similarity may be defined as taxonomic, phenotypic, genetic, phylogenetic, functional, and so on. It uses the diversity framework described in the arXiv paper arXiv:1404.6520 (q-bio.QM), "How to partition diversity".

This package has now reached a stable release and is cross-validated against our Julia package Diversity.jl, which is developed independently. Please raise an issue if you find any problems.

To install rdiversity from CRAN, simply run the following from an R console:

install.packages("rdiversity")

The latest development version can be installed from GitHub:

# install.packages("devtools")
devtools::install_github("boydorr/rdiversity")

Examples of how to use the package are included in our docs, as well as in a vignette currently only available in the development version of this package:

install_github("boydorr/rdiversity", build_vignettes = TRUE)
vignette("examples", "rdiversity")

Copy Link

Version

Install

install.packages('rdiversity')

Monthly Downloads

228

Version

2.2.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Richard Reeve

Last Published

May 6th, 2022

Functions in rdiversity (2.2.0)

loadAttributes

loadAttributes
powermean-class

powermean-class
norm_rho

Normalised rho (low level diversity component)
negate

Binary Negation (!)
norm_meta_rho

Normalised metacommunity rho diversity
meta_gamma

Metacommunity gamma diversity
print.binary

Print method for binary number.
power_mean

Power mean of vector elements
phy_struct

Calculate phylogenetic structure matrix
metadiv

Metacommunity-level diversity
fillUpToByte

Fill up to Byte (00000000..)
distance

Generate distance object
as.binary

as binary digit.
metacommunity-class

metacommunity-class
norm_sub_alpha

Normalised subcommunity alpha diversity
gen2dist

Genetic distance matrix
norm_sub_beta

Normalised subcommunity beta diversity
inddiv

Calculate individual-level diversity
raw_alpha

Raw alpha (low level diversity component)
is.binary

is Binary Vector
raw_beta

Raw beta (low level diversity component)
raw_meta_beta

Raw metacommunity beta diversity
metacommunity

Metacommunity
norm_alpha

Normalised alpha (low level diversity component)
tax2dist

Generate taxonomic distance matrix
raw_meta_rho

Raw metacommunity rho diversity
norm_meta_alpha

Normalised metacommunity alpha diversity
fillUpToBit

Fill up to bit (000..)
raw_gamma

Gamma (low level diversity component)
norm_meta_beta

Normalised metacommunity beta diversity
raw_meta_alpha

Raw metacommunity alpha diversity
phy_abundance

Relative abundance of historical species
phy2dist

Phylogenetic pairwise tip distance matrix
rdiversity-package

rdiversity: diversity measurement in R
subdiv

Calculate subcommunity-level diversity
relativeentropy-class

relativeentropy-class
similarity-class

similarity-class
sub_gamma

Subcommunity gamma diversity
similarity

Generate similarity object
norm_sub_rho

Normalised subcommunity rho diversity
phy2branch

Phylogenetic similarity
norm_beta

Normalised beta (low level diversity component)
raw_rho

Raw rho (low level diversity component)
raw_sub_rho

Raw subcommunity rho diversity
raw_sub_alpha

Raw subcommunity alpha diversity
repartition

Repartition metacommunity
raw_sub_beta

Raw subcommunity beta diversity
summary.binary

Summary method for binary number.
switchEndianess

Switch Endianess.
saveAttributes

saveAttributes
byte

A simple helper function to return the size of one byte
binSeq

Binary sequence
distance-class

distance-class
chainsaw

Function to cut the phylogeny to a specified depth from the tip with the greatest distance from the root.
binAdd

Binary Addition (+)
dist2sim

Distance to similarity
binary

Binary digit.
bytesNeeded

Minimum number of "byte" needed to hold n "bit"
Ops.binary

Group Generic Ops