Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Apr 3, 2024
1 parent 816ac64 commit 4491b24
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/testthat/test-cronbachs_alpha.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ test_that("cronbachs_alpha, data frame", {
x <- mtcars[, c("cyl", "gear", "carb", "hp")]
expect_equal(cronbachs_alpha(x), 0.09463206, tolerance = 1e-3)
})

test_that("cronbachs_alpha", {
expect_message(expect_null(cronbachs_alpha(mtcars[1])), regex = "Too few")
})


test_that("cronbachs_alpha, principal_components", {
skip_if_not_installed("parameters", minimum_version = "0.21.3")
pca <- parameters::principal_components(mtcars[, c("cyl", "gear", "carb", "hp")], n = 2)
Expand All @@ -25,7 +25,6 @@ test_that("cronbachs_alpha, principal_components", {
expect_equal(cronbachs_alpha(pca), c(PC1 = 0.4396, PC2 = -1.44331), tolerance = 1e-3)
})


test_that("cronbachs_alpha, matrix", {
m <- as.matrix(mtcars[c("cyl", "gear", "carb", "hp")])
expect_equal(cronbachs_alpha(m), 0.09463206, tolerance = 1e-3)
Expand Down

0 comments on commit 4491b24

Please sign in to comment.