File: test-rect.dendrogram.R

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 (26 lines) | stat: -rw-r--r-- 821 bytes parent folder | download | duplicates (2)
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
# library(testthat)
#
# context("rect.dendrogram")
#
# test_that("rect.dendrogram work",{
#
# #    dend15 <- c(1:5) %>% dist %>% hclust(method = "average") %>% as.dendrogram
# #    # dend15 <- c(1:25) %>% dist %>% hclust(method = "average") %>% as.dendrogram
# #    dend15 %>% set("branches_k_color") %>% plot
# #    dend15 %>% rect.dendrogram(k=3,
# #                               border = 8, lty = 5, lwd = 2)
#
#
#    # expect_equal(attr(fixed_dend, "members"), 5)
# })
#
#
#


# #### this throws an error
#    dend15 <- c(1:5) %>% dist %>% hclust(method = "average") %>% as.dendrogram
#    # dend15 <- c(1:25) %>% dist %>% hclust(method = "average") %>% as.dendrogram
#    dend15 %>% set("branches_k_color") %>% plot
#    dend15 %>% rect.dendrogram(k=4,
#                               border = 8, lty = 5, lwd = 2)