pastecs (version 1.3.21)

abund: Sort variables by abundance

Description

Sort variables (usually species in a species x stations matrix) in function of their abundance, either in number of non-null values, or in number of individuals (in log). The f coefficient allows adjusting weight given to each of these two criteria.

Usage

abund(x, f = 0.2)

# S3 method for abund extract(e, n, left = TRUE, ...) # S3 method for abund identify(x, label.pts = FALSE, lvert = TRUE, lvars = TRUE, col = 2, lty = 2, ...) # S3 method for abund lines(x, n = x$n, lvert = TRUE, lvars = TRUE, col = 2, lty = 2, ...) # S3 method for abund plot(x, n = x$n, lvert = TRUE, lvars = TRUE, lcol = 2, llty = 2, all = TRUE, dlab = c("cumsum", "% log(ind.)", "% non-zero"), dcol = c(1,2,4), dlty = c(par("lty"), par("lty"), par("lty")), dpos = c(1.5, 20), type = "l", xlab = "variables", ylab = "abundance", main = paste("Abundance sorting for:",x$data, "with f =", round(x$f, 4)), ...) # S3 method for abund print(x, ...) # S3 method for summary.abund print(x, ...) # S3 method for abund summary(object, ...)

Value

An object of type 'abund' is returned. It has methods print(),

summary(), plot(), lines(), identify(), extract().

Arguments

x

A data frame containing the variables to sort according to their abundance in columns for abund, or an 'abund' object for the methods

f

Weight given to the number of individuals criterium (strictly included between 0 and 1; weight for the non-null values is 1-f. The default value, f=0.2, gives enough weight to the number of non-null values to get abundant species according to this criterium first, but allowing to get at the other extreme rare, but locally abundant species

object

An 'abund' object returned by abund

e

An 'abund' object returned by abund

n

The number of variables selected at left

type

the type of graph to plot. By default, lines with 'l'

lvert

If TRUE then a vertical line separate the n variables at left from the others

lvars

If TRUE then the x-axis labels of the n left variables are printed in a different color to emphasize them

lcol

The color to use to draw the vertical line (lvert=TRUE) and the variables labels (lvars=TRUE) at left af the nth variable. By default, color 2 is used

llty

The style used to draw the vertical line (lvert=TRUE). By default, a dashed line is used

xlab

the label of the x-axis

ylab

the label of the y-axis

main

the main title of the graph

all

If TRUE then all lines are drawn (cumsum, %log(ind.) and %non-null). If FALSE, only the cumsum line is drawn

dlab

The legend labels

dcol

Colors to use for drawing the various curves on the graph

dlty

The line style to use for drawing the various curves on the graph

dpos

The position of the legend box on the graph (coordinates of its top-left corner). A legend box is drawn only if all=TRUE

col

The color to use to draw lines

lty

The style used to draw lines

...

additional parameters

label.pts

Do we have to label points on the graph or to chose an extraction level with the identify() method?

left

If TRUE, the n variables at left are extracted. Otherwise, the total-n variables at right are extracted

Author

Philippe Grosjean (phgrosjean@sciviews.org), Frédéric Ibanez (ibanez@obs-vlfr.fr)

Details

Successive sorts can be applied. For instance, a first sort with f = 0.2, followed by an extraction of rare species and another sort with f = 1 allows to collect only rare but locally abundant species.

References

Ibanez, F., J.-C. Dauvin & M. Etienne, 1993. Comparaison des évolutions à long terme (1977-1990) de deux peuplements macrobenthiques de la baie de Morlaix (Manche occidentale): relations avec les facteurs hydroclimatiques. J. Exp. Mar. Biol. Ecol., 169:181-214.

See Also

escouf

Examples

Run this code
data(bnr)
bnr.abd <- abund(bnr)
summary(bnr.abd)
plot(bnr.abd, dpos=c(105, 100))
bnr.abd$n <- 26
# To identify a point on the graph, use: bnr.abd$n <- identify(bnr.abd)
lines(bnr.abd)
bnr2 <- extract(bnr.abd)
names(bnr2)

Run the code above in your browser using DataLab