
vegan
plot.cca
,
plot.decorana
or ordiplot
.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),
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, ...)
ordiplot
object.draw = "lines"
)
or their fills (if draw = "polygon"
) in ordihull
and
ordiellipse
. When draw = "polygon"
, the colour of
bordering lines can becol
our with draw
= "polygon"
in ordihull
and ordiellipse
. The
argument takes precedence over possible transparency definitions
of the colour. The value must be in raTRUE
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 agroups
by their names in the centroid
of the object. ordiellipse
and ordihull
use standard
text
, and others use
sd
) or
standard deviations of their (weighted) averages (se
) are
used.sd
or se
is multiplied with the
corresponding value found from the Chi-squared distribution with
2df.prune
$>0$, dendrogram will be
disconnected.ordihull
or
ordiellipse
. The result is invisible
, but it
can be saved, and used for summaries (areas etc. of hulls and
ellipses).scores
to select axes and scaling etc.ordihull
, ordiellipse
and ordispider
return the invisible
plotting structure. Function ordispider
return the coordinates to which each
point is connected (centroids or
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 result objects have a summary
method that
returns the coordinates of the centres of the ellipses or hulls and
their surface areas in user units. With draw = "none"
only
the result object is returned and nothing is drawn.
ordihull
draws lines
or
polygon
s for the convex
hulls found by function chull
encircling
the items in the groups.
Function ordiellipse
draws lines
or
polygon
s 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 Function ordispider
draws a 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 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.
lines
, segments
and
polygon
. You can pass parameters to
scores
as well. Underlying function for
ordihull
is chull
.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)
Run the code above in your browser using DataLab