Debian Codegraph @

tests/testthat/test-find_dend.R

raw
1 # library(testthat)
2 # library(dendextend)
3
4
5 context("find_dend")
6
7
8 test_that("find_dend works", {
9
10 x <- datasets::mtcars
11 dist_x <- dist(x)
12
13 best_dend <- find_dend(x, dist_methods = c("euclidean"))
14 best_dist_dend <- find_dend(dist_x)
15
16 # should be the same, as dist() resorts to euclidean by default
17 expect_equal(
18 best_dend,
19 best_dist_dend
20 )
21
22 })