Learn R Programming

BiodiversityR (version 1.5)

diversityresult: Alternative Diversity Results

Description

Provides alternative methods of obtaining results on diversity statistics than provided directly by functions diversity, fisher.alpha, specpool and specnumber (all from vegan), although these same functions are called. Some other statistics are also calculated such as the reciprocal Berger-Parker diversity index and abundance (not a diversity statistic). The statistics can be calculated for the entire community, for each site separately, the mean of the sites can be calculated or a jackknife estimate can be calculated for the community.

Usage

diversityresult(x,y="",factor,level,index="Shannon",method="all",sortit=F,
    digits=8)
diversitycomp(x,y="",factor1,factor2="",index="Shannon",
    method="all",sortit=F,...)

Arguments

x
Community data frame with sites as rows, species as columns and species abundance as cell values.
y
Environmental data frame.
factor
Variable of the environmental data frame that defines subsets to calculate diversity statistics for.
level
Level of the variable to create the subset to calculate diversity statistics.
index
Type of diversity statistic with "richness" to calculate species richness, "abundance" to calculate abundance, "Shannon" to calculate the Shannon diversity index, "Simpson" to calculate 1-Simpson concentration index, "inverseSimpson" to calculate the reci
method
Method of calculating the diversity statistics: "all" calculates the diversity of the entire community (all sites pooled), "s" calculates the diversity of each site separatedly, "mean" calculates the average diversity of the sites, "sd" calculates the sta
sortit
Sort the sites by increasing values of the diversity statistic.
digits
Number of digits in the results.
factor1
Variable of the environmental data frame that defines subsets to calculate diversity statistics for.
factor2
Optional second variable of the environmental data frame that defines subsets to calculate diversity statistics for in a crosstabulation with the other variable of the environmental data frame.
...
Other arguments passed to function diversityresult.

Value

  • The functions provide alternative methods of obtaining diversity results. For function diversitycomp, the number of sites is provided as "n".

Details

These functions provide some alternative methods of obtaining results with diversity statistics, although functions diversity, fisher.alpha, specpool, estimateR and specnumber (all from vegan) are called to calculate the various statistics. The reciprocal Berger-Parker diversity index is the reciprocal of the proportional abundance of the most dominant species. J-evenness is calculated as: H / ln(S) where H is the Shannon diversity index and S the species richness. E-evenness is calculated as: exp(H) / S where H is the Shannon diversity index and S the species richness. The method of calculating the diversity statistics include following options: "all" calculates the diversity of the entire community (all sites pooled together), "s" calculates the diversity of each site separatedly, "mean" calculates the average diversity of the sites, whereas "Jackknife" calculates the jackknifed diversity for the entire data frame. Methods "s" and "mean" are not available for function diversitycomp. Gamma diversity estimators assume that the method is "all". Functions diversityresult and diversitycomp allow to calculate diversity statistics for subsets of the community and environmental data sets. Function diversityresult calculates the diversity statistics for the specified level of a selected environmental variable. Function diversitycomp calculates the diversity statistics for all levels of a selected environmental variable separatedly. When a second environmental variable is provided, function diversitycomp calculates diversity statistics as a crosstabulation of both variables.

References

Kindt, R. & Coe, R. (2005) Tree diversity analysis: A manual and software for common statistical methods for ecological and biodiversity studies. http://www.worldagroforestry.org/resources/databases/tree-diversity-analysis

Examples

Run this code
library(vegan)
data(dune.env)
data(dune)
Diversity.1 <- diversityresult(dune, y=dune.env, factor='Management', 
    level='NM', index='Shannon' ,method='s', sortit=TRUE, digits=3)
Diversity.1
diversitycomp(dune, y=dune.env, factor1='Management', factor2="Moisture", 
    index='Shannon' ,method='all', sortit=TRUE, digits=3)

Run the code above in your browser using DataLab