Learn R Programming

vegan (version 2.0-10)

ordiarrows: Add Arrows and Line Segments to Ordination Diagrams

Description

Functions to add arrows, line segments, regular grids of points. The ordination diagrams can be produced by vegan plot.cca, plot.decorana or ordiplot.

Usage

ordiarrows(ord, groups, levels, replicates, order.by, display = "sites",
         show.groups, startmark, label = FALSE, ...)
ordisegments(ord, groups, levels, replicates, order.by, display = "sites",
         show.groups, label = FALSE, ...)
ordigrid(ord, levels, replicates, display = "sites",  lty = c(1,1), 
         col = c(1,1), lwd = c(1,1), ...)

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
order.by
Order points by increasing order of this variable within groups. Reverse sign of the variable for decreasing ordering.
display
Item to displayed.
show.groups
Show only given groups. This can be a vector, or TRUE if you want to show items for which condition is TRUE. This argument makes it possible to use different colours and line types for groups. The default is to show a
label
Label the groups by their names. In ordiellipse, ordihull and ordispider the the group name is in the centroid of the object, in ordiarrows in the start of the arrow, and in
startmark
plotting character used to mark the first item. The default is to use no mark, and for instance, startmark = 1 will draw a circle. For other plotting characters, see pch in points
col
Colour of lines in ordigrid. This argument is also passed to other functions to change the colour of lines.
lty, lwd
Line type, line width used for levels and replicates in ordigrid.
...
Parameters passed to graphical functions such as lines, segments, arrows, or to

Details

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.

See Also

The functions pass parameters to basic graphical functions, and you may wish to change the default values in arrows, lines and segments. You can pass parameters to scores as well.

Examples

Run this code
example(pyrifos)
mod <- rda(pyrifos)
plot(mod, type = "n")
## Annual succession by ditches
ordiarrows(mod, ditch, label = TRUE)
## Show only control and highest Pyrifos treatment
plot(mod, type = "n")
ordiarrows(mod, ditch, label = TRUE, 
   show.groups = c("2", "3", "5", "11"))
ordiarrows(mod, ditch, label = TRUE, show = c("6", "9"),
   col = 2)
legend("topright", c("Control", "Pyrifos 44"), lty = 1, col = c(1,2))

Run the code above in your browser using DataLab