Learn R Programming

dendextend (version 0.16.1)

plot.dendlist: A plot S3 method for dendlist

Description

If the dendlist if of length 1 - then use a normal plotting method. If it is of length 2 or more, use a tangelgram.

Usage

## S3 method for class 'dendlist':
plot(x, which = c(1L, 2L), ...)

Arguments

x
a dendlist
which
an integer vector of length 2, indicating which of the trees in the dendlist object should be plotted
...
parameters to be passed to the plot/tanglegram function

Value

  • A dendlist object

Examples

Run this code
dend <- iris[1:20, -5] %>% dist %>% hclust %>% as.dendrogram
dend2 <- iris[1:20, -5] %>% dist %>% hclust(method = "single") %>% as.dendrogram

x <- dendlist(dend, dend2)
plot(x)

Run the code above in your browser using DataLab