cut.twinspan | R Documentation |
Returns a vector of twinspan
classes at a given level of
hierarchy or classes respecting group heterogeneity for quadrats or
species.
## S3 method for class 'twinspan'
cut(x, level, what = c("quadrat", "species"), binname = FALSE, ...)
twingroup(x, group, what = c("quadrat", "species"))
cuth(x, ngroups, what = c("quadrat", "species"), binname = FALSE)
x |
|
level |
Level of hierarchy for classification. If missing, the final level used in the object will be returned. |
what |
Return either a |
binname |
Use binary label for classes instead of decimal number. |
... |
Other parameters (ignored). |
group |
Group id number. |
ngroups |
Number of groups. |
twinspan
returns only the the classification at the
final level, but any upper level classes can be found by integer
divisions by 2. Function cut
returns a vector class id
numbers for a given level of classification. Utility function
twingroup
returns a logical vector that is TRUE
for
items belonging to a certain group at any level. It can be more
practical in subsetting data.
Function cuth
cuts the classification by class heterogeneity
instead of level, and can be used to implement the modified method
of Roleček et al. (2009). The groups are formed with decreasing
heterogeneity but respecting the hierarchy. Total chi-square (also
known as inertia) is used as the criterion of heterogeneity. The
criterion is calculated with twintotalchi
and the
criterion is based on the same data matrix as internally used in
twinspan
. The function can also be used for species
classification, also with the internally used modified species
matrix.
A vector of class numbers for the given level of hierarchy
using Twinspan identifiers. For identifiers and levels, see
summary.twinspan
,
as.hclust.twinspan
.
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.
predict.twinspan
gives similar classes, but
based on indicator pseudospecies. cutree
provides
a similar functionality for hclust
trees. Function as.hclust.twinspan
generates
corresponding tree presentation, and
plot.twinspan
will print that tree labelling
internal nodes (divisions).
data(ahti)
tw <- twinspan(ahti)
cut(tw)
## traditional twinspan classification by level of hierarchy
cut(tw, level=3)
cut(tw, what = "species")
## number of groups as with level=3, but by group heterogeneity
cuth(tw, ngroups = 8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.