octav-class {sads}R Documentation

Class "octav" for frequencies in abundance octaves

Description

Data frame of frequencies of entities (usually species) in classes of logarithm of abundances at base 2 (Preston's octaves).

Usage

## S4 method for signature 'octav'
lines(x, prop=FALSE, mid=TRUE, ...)
## S4 method for signature 'octav'
plot(x, prop=FALSE, x.oct=FALSE, par.axis=list(), ...)
## S4 method for signature 'octav'
points(x, prop=FALSE, mid=TRUE, ...)

Arguments

x

an object of class octav

prop

logical; if TRUE relative frequencies are returned.

x.oct

logical; if TRUE axis labels are octave numbers, if FALSE upper limit of abundance class are used as labels.

mid

logical; if TRUE x coordinates of abundances are set to the mid of each octave, if FALSE x coordinates of abundances are the values of its octave (see examples)

par.axis

list; further graphical parameters for the plot axes.

...

further parameters to be passed to lines, points or plot functions (except axes in plot, which are set by par.axis.

Objects from the Class

Objects can be created by calls of the form new("octav", ...), but most often by a call to octav or octavpred.

Slots

.Data:

Object of class "list" a data frame of three vectors: octave number (integer), which is the upper limit of the class in log2; upper limit of the class in arithmetic scale (numeric); number of cases in each class (numeric).

names:

Object of class "character"; names of the three vectors of .Data, "octave", "upper", and "Freq", respectively.

row.names:

Object of class "data.frameRowLabels"; default line names for .Data.

.S3Class:

Object of class "character"; indicates inheritance from S3 class data.frame.

Extends

Class "data.frame", directly. Class "list", by class "data.frame", distance 2. Class "oldClass", by class "data.frame", distance 2. Class "vector", by class "data.frame", distance 3.

Methods

lines

signature(x = "octav"): adds frequency data contained in the object as lines in an octave plot created by plot method.

plot

signature(x = "octav", y = "ANY"): creates a histogram of frequencies of species in each octave in the object, a.k.a 'Preston plot'

points

signature(x = "octav"): adds frequency data contained in the object as points in a octave plot created by plot method.

Author(s)

Andre Chalom and Paulo I Prado prado@ib.usp.br

References

Magurran, A.E. 1989. Ecological diversity and its measurement. Princenton University Press.

Preston, F.W. 1948. The commonness and rarity of species. Ecology 29: 254–283.

See Also

octav to get an object of the class from a vector of abundances; octavpred to get an octav object of predicted abundances from a theoretical distribution; man page of prestonfit in package vegan for a detailed account of Preston's octaves and an alternative way to get octaves and model fitting.

Examples

## Creates an octav object from an abundance vector
birds.oc <- octav(birds)
moths.oc <- octav(moths)

## default plot
plot(birds.oc)
## Octave values instead of abundances at x-axis
plot(moths.oc, x.oct=TRUE)

## Using line and argument prop to superpose two data sets
## (Fisher's et al moth data and Preston's bird data)
## mid=FALSE plots points at each octave value and not
## in the midclass (default, useful for histograms)
plot(moths.oc, col=NULL, border=NA, prop=TRUE, x.oct=TRUE, xlab="Octave")
lines(moths.oc, prop=TRUE,  mid=FALSE)
lines(birds.oc, prop=TRUE, mid=FALSE, col="red") 


[Package sads version 0.4.2 Index]