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.
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, ...)
An object of type 'abund' is returned. It has methods print()
,
summary()
, plot()
, lines()
, identify()
, extract()
.
A data frame containing the variables to sort according to their
abundance in columns for abund
, or an 'abund' object for the methods
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
An 'abund' object returned by abund
An 'abund' object returned by abund
The number of variables selected at left
the type of graph to plot. By default, lines with 'l'
If TRUE
then a vertical line separate the n variables at
left from the others
If TRUE
then the x-axis labels of the n left variables
are printed in a different color to emphasize them
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
The style used to draw the vertical line (lvert=TRUE
).
By default, a dashed line is used
the label of the x-axis
the label of the y-axis
the main title of the graph
If TRUE
then all lines are drawn (cumsum, %log(ind.) and
%non-null). If FALSE
, only the cumsum line is drawn
The legend labels
Colors to use for drawing the various curves on the graph
The line style to use for drawing the various curves on the graph
The position of the legend box on the graph (coordinates of its
top-left corner). A legend box is drawn only if all=TRUE
The color to use to draw lines
The style used to draw lines
additional parameters
Do we have to label points on the graph or to chose an
extraction level with the identify()
method?
If TRUE
, the n variables at left are extracted. Otherwise,
the total-n variables at right are extracted
Philippe Grosjean (phgrosjean@sciviews.org), Frédéric Ibanez (ibanez@obs-vlfr.fr)
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.
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.
escouf
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