Description Usage Arguments Details Value Note Author(s) See Also Examples
Functions to add convex hulls, ‘spider’ graphs, ellipses
or cluster dendrogram to ordination diagrams. The ordination
diagrams can be produced by vegan plot.cca,
plot.decorana or ordiplot.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ordihull(ord, groups, display = "sites", draw = c("lines","polygon", "none"),
col = NULL, alpha = 127, show.groups, label = FALSE, ...)
ordiellipse(ord, groups, display="sites", kind = c("sd","se"), conf,
draw = c("lines","polygon", "none"), w = weights(ord, display),
col = NULL, alpha = 127, show.groups, label = FALSE, ...)
ordispider(ord, groups, display="sites", w = weights(ord, display),
spiders = c("centroid", "median"), show.groups,
label = FALSE, ...)
ordicluster(ord, cluster, prune = 0, display = "sites",
w = weights(ord, display), ...)
## S3 method for class 'ordihull'
summary(object, ...)
## S3 method for class 'ordiellipse'
summary(object, ...)
ordiareatest(ord, groups, area = c("hull", "ellipse"), permutations = 999,
parallel = getOption("mc.cores"), ...)
|
ord |
An ordination object or an |
groups |
Factor giving the groups for which the graphical item is drawn. |
display |
Item to displayed. |
draw |
Use either |
col |
Colour of hull or ellipse lines (if |
alpha |
Transparency of the fill |
show.groups |
Show only given groups. This can be a vector, or
|
label |
Label the |
w |
Weights used to find the average within group. Weights are
used automatically for |
kind |
Whether standard deviations of points ( |
conf |
Confidence limit for ellipses, e.g. 0.95. If given, the
corresponding |
spiders |
Are centres or spider bodies calculated either as centroids (averages) or spatial medians. |
cluster |
Result of hierarchic cluster analysis, such as
|
prune |
Number of upper level hierarchies removed from the
dendrogram. If |
object |
A result object from |
area |
Evaluate the area of convex hulls of |
permutations |
a list of control values for the permutations
as returned by the function |
parallel |
Number of parallel processes or a predefined socket
cluster. With |
... |
Parameters passed to graphical functions or to
|
Function ordihull draws lines or
polygons for the convex
hulls found by function chull encircling
the items in the groups.
Function ordiellipse draws lines or
polygons for dispersion ellipses
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.
An ellipsoid hull can be drawn with function
ellipsoidhull of package cluster.
Function ordihull and ordiellipse return invisibly an
object that has a summary method that returns the coordinates
of centroids and areas of the hulls or ellipses. Function
ordiareatest studies the one-sided hypothesis that these
areas are smaller than with randomized 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 corresponding
‘LC’ score. If the argument is a (invisible)
ordihull object, the function will connect the points of the
hull to their centroid.
Function ordicluster overlays a cluster dendrogram onto
ordination. It needs the result from a hierarchic clustering such as
hclust or agnes, or other with
a similar structure. Function ordicluster connects cluster
centroids to each other with line segments. Function
uses centroids of all points in the clusters, and is therefore
similar to average linkage methods.
Functions ordihull, ordiellipse and ordispider
return the invisible plotting structure.
Function ordispider return the coordinates to which each
point is connected (centroids or ‘LC’ scores).
Function ordihull returns a list of coordinates of the hulls
(which can be extracted with scores), and ordiellipse
returns a list of covariance matrices and scales used in drawing the
ellipses.
These functions add graphical items to ordination graph: You
must draw a graph first. To draw line segments, grids or arrows, see
ordisegments, ordigrid
andordiarrows.
Jari Oksanen
The functions pass parameters to basic graphical functions,
and you may wish to change the default values in
lines, segments and
polygon. You can pass parameters to
scores as well. Underlying function for
ordihull is chull.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | data(dune)
data(dune.env)
mod <- cca(dune ~ Management, dune.env)
attach(dune.env)
## pass non-graphical arguments without warnings
plot(mod, type="n", scaling = 3)
## Catch the invisible result of ordihull...
pl <- ordihull(mod, Management, scaling = 3, label = TRUE)
## ... and find centres and areas of the hulls
summary(pl)
## use ordispider to label and mark the hull
plot(mod, type = "n")
pl <- ordihull(mod, Management, scaling = 3)
ordispider(pl, col="red", lty=3, label = TRUE )
## ordispider to connect WA and LC scores
plot(mod, dis=c("wa","lc"), type="p")
ordispider(mod)
## Other types of plots
plot(mod, type = "p", display="sites")
ordicluster(mod, hclust(vegdist(dune)), prune=3, col = "blue")
plot(mod, type="n", display = "sites")
text(mod, display="sites", labels = as.character(Management))
pl <- ordiellipse(mod, Management, kind="se", conf=0.95, lwd=2, draw = "polygon",
col="skyblue", border = "blue")
summary(pl)
|
Loading required package: permute
Loading required package: lattice
This is vegan 2.4-3
BF HF NM SF
CCA1 0.2917476 0.36826105 -1.3505642 0.2762936
CCA2 0.8632208 0.09419919 0.2681515 -0.8139398
Area 0.1951715 0.59943363 1.7398193 1.0144372
BF HF NM SF
CCA1 0.4312652 0.5583211 -1.87848340 0.5601499
CCA2 1.3273917 0.6373120 -0.05503211 -1.3859924
Area 1.4559842 1.3806668 2.73667419 1.5559135
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.