File: depth.Rd

package info (click to toggle)
r-cran-dendextend 1.14.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,888 kB
  • sloc: sh: 13; makefile: 2
file content (33 lines) | stat: -rw-r--r-- 735 bytes parent folder | download | duplicates (3)
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/depth.R
\name{min_depth}
\alias{min_depth}
\alias{max_depth}
\title{Find minimum/maximum depth of a dendrogram}
\usage{
min_depth(dend, ...)

max_depth(dend, ...)
}
\arguments{
\item{dend}{Any nested list object (including \link{dendrogram}).}

\item{...}{unused at the moment.}
}
\value{
Integer, the (min/max) number of nodes from the root to the leafs
}
\description{
As the name implies. This can also work for non-dendrogram nested lists.
}
\examples{

hc <- hclust(dist(USArrests), "ave")
(dend1 <- as.dendrogram(hc)) # "print()" method
is.list(dend1)
is.list(dend1[[1]][[1]][[1]])
dend1[[1]][[1]][[1]]
plot(dend1)
min_depth(dend1)
max_depth(dend1)
}