Learn R Programming

vegan (version 1.4-4)

ordihull: Add Graphical Items to Ordination Diagrams

Description

Functions to add convex hulls, arrows, line segments, regular grids of points, `spider' graphs or ellipses to ordination diagrams. The ordination diagrams can be produced by vegan plot.cca, plot.decorana or ordiplot.

Usage

ordihull(ord, groups, display = "sites", draw = c("lines","polygon"), ...)
ordiarrows(ord, groups, levels, replicates, display = "sites", ...)
ordisegments(ord, groups, levels, replicates, display = "sites", ...)
ordigrid(ord, levels, replicates, display = "sites",  ...)
ordispider(ord, groups, display="sites", w = weights(ord, display), ...)
ordiellipse(ord, groups, display="sites", kind = c("sd","se"), conf,
            draw = c("lines","polygon"), w = weights(ord, display), ...)

Arguments

ord
An ordination object or an ordiplot object.
groups
Factor giving the groups for which the graphical item is drawn.
levels, replicates
Alternatively, regular groups can be defined with arguments levels and replicates, where levels gives the number of groups, and replicates the number of successive items at the same group
display
Item to displayed.
draw
Use either lines or polygon to draw the line. Graphical parameters are passed to both. The main difference is that polygons may be fil
w
Weights used to find the average within group. Weights are used automatically for cca and decorana results, unless undone by the user. w=NULL<
kind
Wheter standard deviations of points (sd) or standard deviations of their (weighted) averages (se) are used.
conf
Confidence limit for ellipses, e.g. 0.95. If given, the corresponding sd or se is multiplied with the corresponding value found from the Chi-squared distribution with 2df.
...
Parameters passed to graphical functions such as lines, segments arrows,

Details

Function ordihull draws lines or polygons for the convex hulls found by function chull encircling the items in the groups.

Function ordiarrows draws arrows and ordisegments draws line segments between successive items in the groups. Function ordigrid draws line segments both within the groups and for the corresponding items among the groups.

Function ordispider draws a `spider' diagram where each point is connected to the group centroid with segments. Weighted centroids are used in the correspondence analysis methods cca and decorana or if the user gives the weights in the call. If ordispider is called with cca or rda result without groups argument, the function connects each `WA' scores to the correspoding `LC' score.

Function ordiellipse draws lines or polygons for dispersion ellipse using either standard deviation of point scores or standard error of the (weighted) average of scores, and the (weighted) correlation defines the direction of the principal axis of the ellipse. The function requires library ellipse.

See Also

The function pass parameters to basic graphical functions, and you may wish to change the default values in arrows, lines, segments and polygon. You can pass parameters to scores as well. Other underlying functions are chull and ellipse.

Examples

Run this code
data(dune)
data(dune.env)
mod <- cca(dune ~ Moisture, dune.env)
attach(dune.env)
plot(mod, type="n")
ordihull(mod, Moisture)
ordispider(mod, col="red")
# The following is not executed automatically because it needs
# a non-standard library `ellipse'. 
ordiellipse(mod, Moisture, kind="se", level=0.95, lwd=2, col="blue")

Run the code above in your browser using DataLab