diversity.indices: Calculate True Diversity and Evenness

Description Usage Arguments Details Value Note Author(s) References Examples

Description

These functions calculate true diversity and evenness for all samples.

Usage

1
2
true.diversity(data, index = "simpson")
evenness(data, index = "simpson")

Arguments

data

a list of otu tables to be processed. See RAM.input.formatting.

index

the index to use for calculations; partial match to "simpson" or "shannon".

Details

For the following sections, S represents the number of species, λ represents the Simpson index, and H' represents the Shannon index.

The formulas for the true diversity of the indices are as follows:

The formulas for the evenness of the indices are as follows:

Value

Both functions return a numeric data frame, where the rows are the given OTUs, and the columns are the samples.

Note

Credit goes to package vegan for the partial argument matching (see References).

Author(s)

Wen Chen and Joshua Simpson.

References

Jari Oksanen, F. Guillaume Blanchet, Roeland Kindt, Pierre Legendre, Peter R. Minchin, R. B. O'Hara, Gavin L. Simpson, Peter Solymos, M. Henry H. Stevens and Helene Wagner (2013). vegan: Community Ecology Package. R package version 2.0-10. http://CRAN.R-project.org/package=vegan

Diversity index. (2014, May 7). In Wikipedia, The Free Encyclopedia. Retrieved 14:57, May 28, 2014, from http://en.wikipedia.org/w/index.php?title= Diversity_index&oldid=607510424

Blackwood, C. B., Hudleston, D., Zak, D. R., & Buyer, J. S. (2007) Interpreting ecological diversity indices applied to terminal restriction fragment length polymorphism data: insights from simulated microbial communities. Applied and Environmental Microbiology, 73(16), 5276-5283.

Examples

1
2
3
4
5
6
7
8
9
data(ITS1, ITS2)
# true diversity, using default index (Simpson)
true.diversity(data=list(ITS1=ITS1))
# true diversity for ITS1 and ITS2, using Shannon
true.diversity(data=list(ITS1=ITS1, ITS2=ITS2), index="shannon")
# default evenness (Simpson) for ITS1/ITS2
evenness(data=list(ITS1=ITS1, ITS2=ITS2))
# Shannon evenness
evenness(data=list(ITS1=ITS1), index="shannon")

Example output

Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.4-4
Loading required package: ggplot2
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
     P1001.1M1 P1001.1M2 P1001.1M3 P1001.1M4 P1001.1M5 P1001.1M6 P1001.1M7
ITS1  11.47097  11.58816    10.248  10.55703  10.52685  9.970848  8.513073
     P1001.1M8 P1001.1M9 P1001.1M10 P1001.1M11 P1001.1M12 P1001.1M13 P1001.1M14
ITS1  8.056537  13.90113   12.31994   7.693098   5.413541   3.114795   4.342026
     P1001.1M15 P1001.1M16
ITS1   1.657672    1.99515
     P1001.1M1 P1001.1M2 P1001.1M3 P1001.1M4 P1001.1M5 P1001.1M6 P1001.1M7
ITS1  24.01954  25.80738  21.33318  22.59430  24.90253  22.17259  18.92645
ITS2  24.48734  20.92458  23.46285  17.27523  19.01075  14.94937  14.52333
     P1001.1M8 P1001.1M9 P1001.1M10 P1001.1M11 P1001.1M12 P1001.1M13 P1001.1M14
ITS1  18.32464  29.92986   24.59926   16.89825   11.20026   8.145409   10.99922
ITS2  14.46438  28.06252   24.79668   21.06696   16.08512  11.617775   10.83376
     P1001.1M15 P1001.1M16
ITS1   3.616749   4.717020
ITS2   5.233091   6.534283
      P1001.1M1  P1001.1M2   P1001.1M3  P1001.1M4   P1001.1M5  P1001.1M6
ITS1 0.01797958 0.02138038 0.013155325 0.04887513 0.014826554 0.01986225
ITS2 0.01311509 0.01355679 0.009692407 0.04013990 0.009205469 0.01124409
      P1001.1M7   P1001.1M8  P1001.1M9 P1001.1M10 P1001.1M11 P1001.1M12
ITS1 0.01188977 0.011252146 0.01829096 0.02968660 0.01448794 0.01292015
ITS2 0.00678595 0.006448252 0.01966438 0.02777705 0.01550730 0.01629781
      P1001.1M13  P1001.1M14  P1001.1M15  P1001.1M16
ITS1 0.005445446 0.008207989 0.003342081 0.003743245
ITS2 0.006293222 0.009330467 0.003071914 0.003391813
     P1001.1M1 P1001.1M2 P1001.1M3 P1001.1M4 P1001.1M5 P1001.1M6 P1001.1M7
ITS1 0.4922114 0.5163659 0.4596363 0.5800067 0.4896938 0.4983206 0.4473233
     P1001.1M8 P1001.1M9 P1001.1M10 P1001.1M11 P1001.1M12 P1001.1M13 P1001.1M14
ITS1 0.4424077 0.5123916  0.5312821  0.4505685  0.4001307  0.3303526  0.3823678
     P1001.1M15 P1001.1M16
ITS1  0.2071312  0.2470609

RAM documentation built on May 2, 2019, 3:04 p.m.