In the entropart package, individuals of different "species" are counted in several "communities" which are agregated to define a "metacommunity". In the metacommunity, the probability to find a species in the weighted average of probabilities in communities. This is a naming convention, which may correspond to plots in a forest inventory or any data organized the same way.
The simplest way to import data is to organize it into two text files. The first file should contain abundance data: the first column named Species
for species names, and a column for each community.
Species |
NameOfCommunity1 |
NameOfCommunity2 |
NameOfSpecies1 |
1 |
5 |
NameOfSpecies2 |
4 |
2 |
Species |
The second file should contain the community weights and be organized as follows:
Communities |
Weights |
NameOfCommunity1 |
3 |
Files can be read and data imported by code such as:
Abundances <- read.csv(file="Abundances.csv") Weights <- read.csv(file="Weights.csv") MC <- MetaCommunity(Abundances, Weights)The last line of the code calls the
MetaCommunity
function to create an object that will be used by all metacommunity functions,
such as DivPart
(to partition diversity), DivEst
(to partition diversity and calculate confidence interval of its estimation)
or DivProfile
(to compute diversity profiles).
The package also provides community functions to calculate entropy or diversity with bias correction from a vector of probabilities or abundances, such as bcShannon
(to calculate the reduced-bias estimator of Shannon entropy of a community) or Diversity
(to calculate the true diversity of a community).
Phylogenetic entropy and diversity can be calculated if a phylogenetic (or functional), ultrametric tree is provided. See PhyloEntropy
, Rao
for examples of entropy and bcPhyloDiversity
to calculate phylodiversity, with bias correction. Similarity-based diversity is calculated with Dqz
or (with bias correction) bcDqz
, based on a similarity matrix.Marcon, E., Scotti, I., Herault, B., Rossi, V. and Lang G. (2014). Generalization of the partitioning of Shannon diversity. PLOS One 9(3): e90289.
Marcon, E., Zhang, Z. and Herault, B. (2014). The decomposition of similarity-based diversity and its bias correction. HAL hal-00989454(version 1).