The R Project SVN R

Rev

Rev 70613 | Rev 80080 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 70613 Rev 79012
Line 1... Line 1...
1
% File src/library/stats/man/dendrogram.Rd
1
% File src/library/stats/man/dendrogram.Rd
2
% Part of the R package, https://www.R-project.org
2
% Part of the R package, https://www.R-project.org
3
% Copyright 1995-2016 R Core Team
3
% Copyright 1995-2020 R Core Team
4
% Copyright 2002-2015 The R Foundation
4
% Copyright 2002-2015 The R Foundation
5
% Distributed under GPL 2 or later
5
% Distributed under GPL 2 or later
6
 
6
 
7
\name{dendrogram}
7
\name{dendrogram}
8
\title{General Tree Structures}
8
\title{General Tree Structures}
Line 245... Line 245...
245
 
245
 
246
## simple test for as.hclust() as the inverse of as.dendrogram():
246
## simple test for as.hclust() as the inverse of as.dendrogram():
247
stopifnot(identical(as.hclust(dend1)[1:4], hc[1:4]))
247
stopifnot(identical(as.hclust(dend1)[1:4], hc[1:4]))
248
 
248
 
249
dend2 <- cut(dend1, h = 70)
249
dend2 <- cut(dend1, h = 70)
-
 
250
## leaves are wrong horizontally in R 4.0 and earlier:
250
plot(dend2$upper)
251
plot(dend2$upper)
251
## leaves are wrong horizontally:
-
 
252
plot(dend2$upper, nodePar = list(pch = c(1,7), col = 2:1))
252
plot(dend2$upper, nodePar = list(pch = c(1,7), col = 2:1))
253
##  dend2$lower is *NOT* a dendrogram, but a list of .. :
253
##  dend2$lower is *NOT* a dendrogram, but a list of .. :
254
plot(dend2$lower[[3]], nodePar = list(col = 4), horiz = TRUE, type = "tr")
254
plot(dend2$lower[[3]], nodePar = list(col = 4), horiz = TRUE, type = "tr")
255
## "inner" and "leaf" edges in different type & color :
255
## "inner" and "leaf" edges in different type & color :
256
plot(dend2$lower[[2]], nodePar = list(col = 1),   # non empty list
256
plot(dend2$lower[[2]], nodePar = list(col = 1),   # non empty list