chclust {rioja} | R Documentation |
Constrained hierarchical clustering.
chclust(d, method = "coniss") ## S3 method for class 'chclust': plot(x, labels = NULL, hang = 0.1, axes = TRUE, xvar=1:(length(x$height)+1), xlim=NULL, ylim=NULL, x.rev = FALSE, y.rev=FALSE, horiz=FALSE, ...) ## S3 method for class 'chclust': bstick(n, ng=10, plot=TRUE, ...)
d |
a dissimilarity structure as produced, for example, by dist or vegdist . |
method |
the agglomeration method to be used. This should be (an unambiguous abbreviation of) either "coniss" or "conslink". |
x, n |
a constrained cluster object of class chclust produced by chclust. |
xvar |
numeric vector containing x-coordinates for the leaves of the dendrogram (see details below). |
x.rev,y.rev |
logical flags to reverse the x- or y-axis (and dendrogram labels). Defaults to FALSE . |
horiz |
logical indicating if the dendrogram should be drawn horizontally or not. Note that y-axis still refers to the dendrogram height even after rotating. |
xlim, ylim |
optional x- and y-limits of the plot, passed to the underlying plto function. The defaults for these show the full dendrogram. |
labels, hang, axes |
further arguments as in hclust . |
ng |
number of groups to display. |
plot |
logical to plot a broken stick model. Defaults to TRUE . |
... |
further graphical arguments. Use cex to change the text size of the x-axis labels, and cex.axis to change size of the y-axis values. |
chclust
performs a constrained hierarchical clustering of a distance matrix, with clusters constrained by sample order. Returns an object of class chclust
which can be plotted and interrogated. See Grimm (1987), Gordon & Birks (1972) and Birks & Gordon (1985) for discusssiom of the coniss and conslink algorithms. The resulting dendrogram can be plotted with plot
. This is an extension of plclust
that allows the dendrogram to be plotted horizontally or vertically (default). plot
also accepts a numeric vector coordinates for x-axis positions of the leaves of the dendrogram. These could, for example, be the stratigraphic depths of core samples or geographic distances along a line transect.
bstick.chclust
compares the dispersion of a hierarchical classification to that obtained from a broken stick model and displays the results graphically. See Bennett (1996) for details. bstick
is a generic function and the default method is defined in package vegan
. If this package is loaded the function may be called using bstick
, otherwise use bstick.chclust
.
Function chclust
returns an object of class chclust
, derived from hclust
.
Steve Juggins
Bennett, K. (1996) Determination of the number of zones in a biostratigraphic sequence. New Phytologist, 132, 155-170.
Birks, H.J.B. & Gordon, A.D. (1985) Numerical Methods in Quaternary Pollen Analysis Academic Press, London.
Gordon, A.D. & Birks, H.J.B. (1972) Numerical methods in Quaternary palaeoecology I. Zonation of pollen diagrams. New Phytologist, 71, 961-979.
Grimm, E.C. (1987) CONISS: A FORTRAN 77 program for stratigraphically constrained cluster analysis by the method of incremental sum of squares. Computers & Geosciences, 13, 13-35.
hclust
, plclust
, cutree
, dendrogram
,
bstick
.
data(RLGH) diss <- dist(sqrt(RLGH$spec/100)^2) clust <- chclust(diss) bstick.chclust(clust, 10) # Basic diagram plot(clust, hang=-1) # Rotated through 90 degrees plot(clust, hang=-1, horiz=TRUE) # Rotated and observations plotted according to sample depth. plot(clust, xvar=RLGH$depth$Depth, hang=-1, horiz=TRUE, x.rev=TRUE) # Conslink for comparison clust <- chclust(diss, method = "conslink") plot(clust, hang=-1)