Skip to content

Commit

Permalink
test with parameters dev
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Sep 16, 2023
1 parent 4faeee9 commit a0407f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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
8 changes: 6 additions & 2 deletions tests/testthat/test-cronbachs_alpha.R
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down

0 comments on commit a0407f2

Please sign in to comment.