Learn R Programming

sads (version 0.2.2)

octav: Frequencies of species in octaves

Description

Creates an object of octav-class with number of species in octaves of abundances from a vector of abundances or from a fitted model.

Usage

octav(x, oct, preston=FALSE)

Arguments

x
a numerical vector of abundances or an object of class fitsad or fitrad.
oct
integer vector; the octaves to tabulate abundances. Should include all abundance values in x.
preston
logical; if 'TRUE' use Preston method to count frequencies (see details), if 'FALSE' class intervals are open on the left (default in cut).

Value

  • an object of class octav, which is a data frame with three vectors:
  • octavinteger; octave number, which is the upper limit of the class in log2.
  • uppernumeric; upper limit of the class in arithmetic scale.
  • Freqinteger or numeric; (relative) frequencies of species in each class.

Details

Preston (1948) popularized the use of histograms with logarithmic classes to depict species abundance distributions (Magurran 1989). Preston used classes at log base two, which he called octaves as their end-points double from one class to the other. In Preston original method half of the species with abundances equal to the limits of octaves are credited to the neighboring octave. If preston=TRUE this non-standard method of class closure is applied. In general this makes the histogram more bell-shaped, as Preston expected (see example).

References

Magurran, A.E. 1989. Ecological diversity and its measurement. Princeton University Press. Preston, F.W. 1948. The commonness and rarity of species. Ecology 29: 254--283.

See Also

octav-class for methods to create an octave plot; octavpred to get an octav object of predicted abundances from a theoretical distribution; fitsad-class and fitrad-class objects, from which you can also get an object of class octav; man page of prestonfit in package vegan for a detailed account of Preston's octaves and an alternative way to get octaves and fitting of species abundances distributions.

Examples

Run this code
## BCI tree data
(bci.oc1 <- octav(bci, preston=TRUE))
## Comparing with standard class closure
par(mfrow=c(1,2))
plot(octav(bci), main="octav(bci, preston=FALSE)")
plot(bci.oc1, main="octav(bci, preston=TRUE)")
par(mfrow=c(1,1))

Run the code above in your browser using DataLab