speciesdiv {adiv}R Documentation

Indices of Species Diversity


The function speciesdiv calculates diversity indices that rely on relative or absolute species abundance.


speciesdiv(comm, method = "full", tol = 1e-8)



a data frame or a matrix typically with communities as rows, species as columns and presence/absence or abundance as entry. Note that with presence/absence (0/1) data, only species richness will be calculated correctly.


a string or a vector of strings: one or several of "richness", "GiniSimpson", "Simpson", "Shannon", "Margalef", "Menhinick", "McIntosh", "full". See details.


a tolerance threshold (a value between -tol and tol is considered equal to zero)


Let S_i be the number of species in community i, n_ij be the absolute abundance of species j in community i, N_i the sum of all species abundance in community i (N_i=sum_j n_ij; the sum of row i in comm), p_ij the relative abundance of species j in community i (p_ij=n_ij/N_i). If method="richness", the diversity index is the number of species. If method="GiniSimpson", the diversity index is that of Gini (1912) and Simpson (1949): 1-sum_j p_ij^2. If method="Simpson", the diversity index is (Simpson 1949): 1/(sum_j p_ij^2). If method="Shannon", the diversity index is that of Shannon (1948) with neperian logarithm: -sum_j p_ij log(p_ij). If method="Margalef", the diversity index is that of Margalef (1972): (S_i-1)/log(N_i). If method="Menhinick", the diversity index is that of Menhinick (1964): S_i/sqrt(N_i). If method="McIntosh", the diversity index is that of McIntosh (1967): (N_i-sqrt(sum_j n_ij^2))/(N_i-sqrt(N_i)). If one of the strings is "full", then all indices are calculated.


Function speciesdiv returns a matrix with communities as rows and the diversity indices as columns.


Sandrine Pavoine sandrine.pavoine@mnhn.fr


Gini, C. (1912) Variabilita e mutabilita. Studi economicoaguridici delle facoltta di giurizprudenza dell, Universite di Cagliari III, Parte II.

Magurran, A.E. (2004) Measuring biological diversity. Blackwell Publishing, Oxford, U.K.

Margalef, R. (1972) Homage to Evelyn Hutchinson, or why is there an upper limit to diversity? Transactions of the Connecticut Academy of Arts and Sciences, 44, 211–235.

McIntosh, R.P. (1967) An index of diversity and the relation of certain concepts to diversity. Ecology, 48, 392–404.

Menhinick, E.F. (1964) A Comparison of some species-individuals diversity indices applied to samples of field insects. Ecology, 45, 859–861.

Shannon, C.E. (1948) A mathematical theory of communication. Bell System technical journal, 27, 379–423, 623–656.

Simpson, E.H. (1949) Measurement of diversity. Nature, 163, 688.


ab <- batcomm$ab

[Package adiv version 2.1.1 Index]