Learn R Programming

adiv (version 1.2)

divparam: Parametric Indices of Species Diversity

Description

The function divparam calculates parametric diversity indices. The parameter controls the relative importance given to rare versus abundant species in a community. The function plot.divparam plots the results of function divparam.

Usage

divparam(comm, method = c("hill", "tsallis", "renyi"), q = 2, tol = 1e-08)

# S3 method for divparam plot(x, legend = TRUE, legendposi = "topright", type = "b", col = if (is.numeric(x)) NULL else sample(colors(distinct = TRUE), nrow(x$div)), lty = if (is.numeric(x)) NULL else rep(1, nrow(x$div)), pch = if (is.numeric(x)) NULL else rep(19, nrow(x$div)), …)

Arguments

comm

a data frame or a matrix typically with communities as rows, species as columns and abundance as entry.

method

a character: either "hill" for the Hill numbers (Hill 1973), "tsallis" for the Tsallis or HCDT entropy (Harvda and Charvat 1967; Daroczy 1970; Tsallis 1988), or "renyi" for Renyi's entropy (Renyi 1960).

q

a positive numeric or a vector of positive numerics that give values for the q parameter.

tol

numeric tolerance threshold: values between -tol and tol are considered equal to zero.

x

an object of class divparam obtained with function divparam.

legend

a logical. If TRUE a legend is given with the colour, the type of line (etc.) used to define the diversity curve of each community.

legendposi

a character or a numeric that gives the position of the legend to be passed to function legend of the base of R.

type

a character to be passed to the graphic parameter type of functions plot and lines used to draw the diversity curve of each community.

col

colours to be passed to the graphic parameter col of functions plot and lines to define the colour of the diversity curve of each community.

lty

type of line (plain, broken etc.) to be passed to the graphic parameter lty of functions plot and lines used to draw the diversity curve of each community.

pch

type of point (open circle, close circle, square etc.) to be passed to the graphic parameter pch of functions plot and lines used to draw the diversity curve of each community.

other parameters can be added and passed to the functions plot and lines used to draw the graphic.

Value

Function divparam, if only one value of q is given, returns a vector with communities' diversities. If more than one value of q is given, a list of two objects is returned:

q

the vector of values for q

div

a data frame with communities' diversities calculated for all values of q

The function plot.divparam returns a graphic.

References

Daroczy, Z. (1970) Generalized information functions. Information and Control, 16, 36--51.

Havrda, M., Charvat, F. (1967) Quantification method of classification processes: concept of structural alpha-entropy. Kybernatica, 3, 30--35.

Hill, M.O. (1973) Diversity and evenness: a unifying notation and its consequences. Ecology, 54, 427--432.

Renyi, A. (1960) On measures of entropy and information. Proceedings of the Fourth Berkeley Symposium on Mathematical Statistics and Probability, 1, 547--561.

Tsallis, C. (1988) Possible generalization of Boltzmann-Gibbs statistics. Journal of Statistical Physics, 52, 480--487.

Examples

Run this code
# NOT RUN {
data(batcomm)
ab <- batcomm$ab
plot(divparam(ab))
plot(divparam(ab, q=0:4))
# }

Run the code above in your browser using DataLab