| Line 12... |
Line 12... |
| 12 |
\alias{as.dendrogram.hclust}
|
12 |
\alias{as.dendrogram.hclust}
|
| 13 |
\alias{as.hclust.dendrogram}
|
13 |
\alias{as.hclust.dendrogram}
|
| 14 |
\alias{cut.dendrogram}
|
14 |
\alias{cut.dendrogram}
|
| 15 |
\alias{[[.dendrogram}
|
15 |
\alias{[[.dendrogram}
|
| 16 |
\alias{merge.dendrogram}
|
16 |
\alias{merge.dendrogram}
|
| - |
|
17 |
\alias{nobs.dendrogram}
|
| 17 |
\alias{plot.dendrogram}
|
18 |
\alias{plot.dendrogram}
|
| 18 |
\alias{print.dendrogram}
|
19 |
\alias{print.dendrogram}
|
| 19 |
\alias{rev.dendrogram}
|
20 |
\alias{rev.dendrogram}
|
| 20 |
\alias{str.dendrogram}
|
21 |
\alias{str.dendrogram}
|
| 21 |
\alias{is.leaf}
|
22 |
\alias{is.leaf}
|
| Line 42... |
Line 43... |
| 42 |
|
43 |
|
| 43 |
\method{cut}{dendrogram}(x, h, \dots)
|
44 |
\method{cut}{dendrogram}(x, h, \dots)
|
| 44 |
|
45 |
|
| 45 |
\method{merge}{dendrogram}(x, y, \dots, height)
|
46 |
\method{merge}{dendrogram}(x, y, \dots, height)
|
| 46 |
|
47 |
|
| - |
|
48 |
\method{nobs}{dendrogram}(objects, \dots)
|
| - |
|
49 |
|
| 47 |
\method{print}{dendrogram}(x, digits, \dots)
|
50 |
\method{print}{dendrogram}(x, digits, \dots)
|
| 48 |
|
51 |
|
| 49 |
\method{rev}{dendrogram}(x)
|
52 |
\method{rev}{dendrogram}(x)
|
| 50 |
|
53 |
|
| 51 |
\method{str}{dendrogram}(object, max.level = NA, digits.d = 3,
|
54 |
\method{str}{dendrogram}(object, max.level = NA, digits.d = 3,
|
| Line 96... |
Line 99... |
| 96 |
\item{horiz}{logical indicating if the dendrogram should be drawn
|
99 |
\item{horiz}{logical indicating if the dendrogram should be drawn
|
| 97 |
\emph{horizontally} or not.}
|
100 |
\emph{horizontally} or not.}
|
| 98 |
\item{frame.plot}{logical indicating if a box around the plot should
|
101 |
\item{frame.plot}{logical indicating if a box around the plot should
|
| 99 |
be drawn, see \code{\link{plot.default}}.}
|
102 |
be drawn, see \code{\link{plot.default}}.}
|
| 100 |
\item{h}{height at which the tree is cut.}
|
103 |
\item{h}{height at which the tree is cut.}
|
| 101 |
\item{height}{height at which the two dendrogram should be merged. If not
|
104 |
\item{height}{height at which the two dendrograms should be merged. If not
|
| 102 |
specified (or \code{NULL}), the default is ten percent larger than
|
105 |
specified (or \code{NULL}), the default is ten percent larger than
|
| 103 |
the (larger of the) two component heights.}
|
106 |
the (larger of the) two component heights.}
|
| 104 |
\item{xlim, ylim}{optional x- and y-limits of the plot, passed to
|
107 |
\item{xlim, ylim}{optional x- and y-limits of the plot, passed to
|
| 105 |
\code{\link{plot.default}}. The defaults for these show the full
|
108 |
\code{\link{plot.default}}. The defaults for these show the full
|
| 106 |
dendrogram.}
|
109 |
dendrogram.}
|
| Line 170... |
Line 173... |
| 170 |
2.13.0, there is also a \code{\link{as.hclust}()} method as an inverse.
|
173 |
2.13.0, there is also a \code{\link{as.hclust}()} method as an inverse.
|
| 171 |
|
174 |
|
| 172 |
\code{rev.dendrogram} simply returns the dendrogram \code{x} with
|
175 |
\code{rev.dendrogram} simply returns the dendrogram \code{x} with
|
| 173 |
reversed nodes, see also \code{\link{reorder.dendrogram}}.
|
176 |
reversed nodes, see also \code{\link{reorder.dendrogram}}.
|
| 174 |
|
177 |
|
| 175 |
The \code{\link{merge}(x, y, ...)} method which merges two or more
|
178 |
The \code{\link{merge}(x, y, ...)} method merges two or more
|
| 176 |
dendrograms into a new one which has \code{x} and \code{y} (and
|
179 |
dendrograms into a new one which has \code{x} and \code{y} (and
|
| 177 |
optional further arguments) as branches.
|
180 |
optional further arguments) as branches.
|
| 178 |
|
181 |
|
| - |
|
182 |
\code{\link{nobs}(object)} returns the total number of leaves (the
|
| - |
|
183 |
\code{members} attribute, see above).}
|
| - |
|
184 |
|
| 179 |
\code{is.leaf(object)} returns logical indicating if \code{object} is a
|
185 |
\code{is.leaf(object)} returns logical indicating if \code{object} is a
|
| 180 |
leaf (the most simple dendrogram).
|
186 |
leaf (the most simple dendrogram).
|
| 181 |
|
187 |
|
| 182 |
\code{plotNode()} and \code{plotNodeLimit()} are helper functions.
|
188 |
\code{plotNode()} and \code{plotNodeLimit()} are helper functions.
|
| 183 |
}
|
189 |
}
|
| Line 236... |
Line 242... |
| 236 |
par(op)
|
242 |
par(op)
|
| 237 |
d3 <- dend2$lower[[2]][[2]][[1]]
|
243 |
d3 <- dend2$lower[[2]][[2]][[1]]
|
| 238 |
stopifnot(identical(d3, dend2$lower[[2]][[c(2,1)]]))
|
244 |
stopifnot(identical(d3, dend2$lower[[2]][[c(2,1)]]))
|
| 239 |
str(d3, last.str = "'")
|
245 |
str(d3, last.str = "'")
|
| 240 |
|
246 |
|
| 241 |
## to peak at the inner structure "if you must", use '[..]' indexing :
|
247 |
## to peek at the inner structure "if you must", use '[..]' indexing :
|
| 242 |
str(d3[2][[1]]) ## or the full
|
248 |
str(d3[2][[1]]) ## or the full
|
| 243 |
str(d3[])
|
249 |
str(d3[])
|
| 244 |
|
250 |
|
| 245 |
## merge() to join dendrograms:
|
251 |
## merge() to join dendrograms:
|
| 246 |
(d13 <- merge(dend2$lower[[1]], dend2$lower[[3]]))
|
252 |
(d13 <- merge(dend2$lower[[1]], dend2$lower[[3]]))
|