Description Usage Arguments Details Value Author(s) See Also Examples
The functions compute a contingency table (contingency(object)
) and call hclust
on this matrix.
1 2 3 4 5 6 7 8 |
x, object |
|
table |
character. Either |
labels |
character. Column of |
dendrogram |
dendrogram. Object to be used to reorder the partitions as to reflect the topology (order of tips) of a dendrogram. |
... |
Arguments passed to |
The as*
methods coerce objects to the class indicated by their name.
Plotting the topology of partitions can provide insights into relations of clusters to each other.
As the VegsoupPartition
constructor function looses the information that could be retained from hierarchical clustering methods, this is a way to rediscover parts of this information.
Method reorder
uses the topology of a dendrogram to reorder the partitioning vector of an object.
This can be useful to define an order for methods like constancy
or latex.
.
hclust
, dendrogram
, or VegsoupPartition
object.
Roland Kaiser
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | x <- VegsoupPartition(windsfeld, k = 10)
par(mfrow = c(3,3))
# vegdist defaults to euclidean
vegdist(x)
plot(as.hclust(x, "constancy"))
plot(as.hclust(x, "average"))
plot(as.hclust(x, "contingency"))
# resetting invokes recalculation of the partitioning vector!
# we will regenerate it afterwards
p <- partitioning(x)
vegdist(x) <- "bray"
x <- VegsoupPartition(x, method = "external", clustering = p)
plot(as.hclust(x, "constancy"))
plot(as.hclust(x, "average"))
plot(as.hclust(x, "contingency"))
# set method in hclust
plot(as.hclust(x, "constancy", "single"))
plot(as.hclust(x, "constancy", "complete"))
plot(as.hclust(x, "constancy", "average"))
# as.dendrogram
par(mfrow = c(2,1))
plot(as.dendrogram(x))
# define labels for as.dendrogram
x$label <- LETTERS[partitioning(x)]
plot(as.dendrogram(x, labels = "label"))
# reorder slot 'partition' with a dendrogram
# see the differnce using a constancy table
head(constancy(x))
xx <- reorder(x, as.dendrogram(x))
head(constancy(xx))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.