Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Mar 17, 2024
1 parent 24faae5 commit c094025
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/testthat/test-checks.R
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
test_that("check_factorstructure", {
skip_if_not_installed("parameters")
x <- check_factorstructure(mtcars)
expect_equal(x$KMO$MSA, 0.826, tolerance = 0.01)
expect_equal(x$sphericity$chisq, 408.011, tolerance = 0.01)
expect_equal(x$KMO$MSA, 0.8265536, tolerance = 0.01)
expect_equal(x$sphericity$chisq, 408.0116, tolerance = 0.01)
})

test_that("check_clusterstructure, ok", {
skip_if_not_installed("parameters")
set.seed(333)
out <- check_clusterstructure(iris[, 1:4])
expect_equal(out$H, 0.187, tolerance = 0.01)
expect_equal(out$H, 0.1869618, tolerance = 0.01)
expect_identical(
capture.output(print(out)),
c(
"# Clustering tendency",
"",
"The dataset is suitable for clustering (Hopkins' H = 0.18)."
"The dataset is suitable for clustering (Hopkins' H = 0.19)."
)
)
})
Expand Down

0 comments on commit c094025

Please sign in to comment.