as.dendlist: Try to coerce something into a dendlist

View source: R/dendlist.R

as.dendlistR Documentation

Try to coerce something into a dendlist

Description

It removes stuff that are not dendgrogram/dendlist and turns what is left into a dendlist

Usage

as.dendlist(x, ...)

Arguments

x

a list with several dendrogram/hclust/phylo or dendlist objects and other junk that should be omitted.

...

NOT USED

Value

A list of class dendlist where each item is a dendrogram

Examples


## Not run: 

dend <- iris[, -5] %>%
  dist() %>%
  hclust() %>%
  as.dendrogram()
dend2 <- iris[, -5] %>%
  dist() %>%
  hclust(method = "single") %>%
  as.dendrogram()

x <- list(dend, 1, dend2)
as.dendlist(x)

## End(Not run)


talgalili/dendextend documentation built on Jan. 27, 2024, 7:43 p.m.