From a0407f27d23440d7dd22470d46bab6262eda7267 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 16 Sep 2023 15:09:26 +0200 Subject: [PATCH] test with parameters dev --- DESCRIPTION | 4 ++-- tests/testthat/test-cronbachs_alpha.R | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 77a7031d0..8c9526e74 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: performance Title: Assessment of Regression Models Performance -Version: 0.10.5.1 +Version: 0.10.5.2 Authors@R: c(person(given = "Daniel", family = "Lüdecke", @@ -149,4 +149,4 @@ Config/Needs/website: r-lib/pkgdown, easystats/easystatstemplate Config/rcmdcheck/ignore-inconsequential-notes: true -Remotes: easystats/see, easystats/parameters@rc_0.21.2 +Remotes: easystats/see, easystats/parameters@pca_with_n1 diff --git a/tests/testthat/test-cronbachs_alpha.R b/tests/testthat/test-cronbachs_alpha.R index 1c45d8db5..a2670e979 100644 --- a/tests/testthat/test-cronbachs_alpha.R +++ b/tests/testthat/test-cronbachs_alpha.R @@ -9,10 +9,14 @@ test_that("cronbachs_alpha", { test_that("cronbachs_alpha, principal_components", { - skip_if_not_installed("parameters", minimum_version = "0.20.3") - pca <- parameters::principal_components(mtcars[, c("cyl", "gear", "carb", "hp")], n = 1) + skip_if_not_installed("parameters", minimum_version = "0.21.2.1") + pca <- parameters::principal_components(mtcars[, c("cyl", "gear", "carb", "hp")], n = 2) expect_equal(cronbachs_alpha(pca, verbose = FALSE), c(PC1 = 0.1101384), tolerance = 1e-3) expect_warning(cronbachs_alpha(pca)) + + pca <- parameters::principal_components(mtcars[, c("cyl", "gear", "carb", "hp")], n = 1) + expect_equal(cronbachs_alpha(pca, verbose = FALSE), c(PC1 = 0.09463206), tolerance = 1e-3) + expect_silent(cronbachs_alpha(pca)) }) test_that("cronbachs_alpha, principal_components", {