as.hclust.twinspan | R Documentation |
Function extracts classification as an hclust
object. The terminal items are the final groups, but quadrats or
species are not shown: hclust
cannot handle
polytomies that are needed to display group members. Use
as.dendrogram
to show the single items. The group ID
number and number of items in the terminal group are used as group
names and are displayed in plots.
## S3 method for class 'twinspan'
as.hclust(
x,
height = c("level", "chi"),
what = c("quadrat", "species"),
binname = FALSE,
...
)
x |
|
height |
Use either division levels ( |
what |
Extract |
binname |
Use binary labels for classes instead of decimal numbers. |
... |
Other parameters to the function (ignored). |
Function can return either a tree showing the twinspan
hierarchy or showing the heterogeneity of each group or
division. In the first case, all divisions and groups at a certain
level of hierarchy are at the same height, but in the latter the
divisions are at the height defined by their heterogeneity. The
criterion of heterogeneity is the total chi-square (also known as
inertia) of the matrix that twinspan
internally uses
in that division (see twintotalchi
). This tree gives
the visual presentation of the modified method of Roleček et
al. (2009).
When tree heights are based on heterogeneity, subgroups can be more heterogeneous than their parent group. These appear as reversed branches in the tree. A warning is issued for each such case.
an hclust
object amended with labels for
internal nodes (nodelabels
).
Roleček, J, Tichý, L., Zelený, D. & Chytrý, M. (2009). Modified TWINSPAN classification in which the hierarchy respects cluster heterogeneity. J Veg Sci 20: 596–602.
as.dendrogram.twinspan
provides an
alternative which also shows the sampling units (quadrats or
species). The result is based hclust
and can be
handled with its support
functions. plot.twinspan
,
image.twinspan
display the tree. Function
cut.twinspan
cuts the tree by a level of
hierarchy, and cuth
by heterogeneity for original
sampling units (quadrats, species).
data(ahti)
tw <- twinspan(ahti)
plot(as.hclust(tw, what = "species"))
cl <- as.hclust(tw)
## plot and 8 groups by hierarchy level
plot(cl)
rect.hclust(cl, 8)
## plot and 8 groups by heterogeneity
cl <- as.hclust(tw, height="chi")
plot(cl)
rect.hclust(cl, 8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.