Debian Codegraph @

man/as.phylo.dendrogram.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/ape.R
3 \name{as.phylo.dendrogram}
4 \alias{as.phylo.dendrogram}
5 \title{Convert a dendrogram into phylo}
6 \usage{
7 as.phylo.dendrogram(x, ...)
8 }
9 \arguments{
10 \item{x}{a dendrogram}
11
12 \item{...}{ignored.}
13 }
14 \value{
15 A phylo class object
16 }
17 \description{
18 Based on \link{as.hclust.dendrogram} with \link[ape]{as.phylo.hclust}
19
20 In the future I hope a more direct link will be made.
21 }
22 \examples{
23 \dontrun{
24
25 library(dendextend)
26 library(ape)
27 dend <- iris[1:30, -5] \%>\%
28 dist() \%>\%
29 hclust() \%>\%
30 as.dendrogram()
31 dend2 <- as.phylo(dend)
32 plot(dend2, type = "fan")
33
34 library(dendextend)
35 library(ggplot2)
36 # no longer needed: library(ggdendro)
37 dend <- iris[1:30, -5] \%>\%
38 dist() \%>\%
39 hclust() \%>\%
40 as.dendrogram()
41 # there is a bug in the location of the labels
42 # If you want to solve it - please send a Pull Request to:
43 # https://github.com/talgalili/dendextend/
44 ggplot(dend) +
45 scale_y_reverse(expand = c(0.2, 0)) + coord_polar(start = 1, theta="x")
46
47 }
48
49
50 # see: https://github.com/klutometis/roxygen/issues/796
51 #
52 }
53 \seealso{
54 \link{as.dendrogram}, \link{as.hclust}, \link[ape]{as.phylo}
55 }