Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Dec 1, 2023
1 parent d6a0626 commit 69f4b30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test-pca.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ test_that("principal_components", {
})

test_that("principal_components", {
x <- model_parameters(principal(mtcars[, 1:7], nfactors = 2))
x <- model_parameters(principal_component(mtcars[, 1:7], nfactors = 2))
expect_equal(
x$RC1,
c(
Expand All @@ -75,7 +75,7 @@ test_that("principal_components", {

expect_named(x, c("Variable", "RC1", "RC2", "Complexity", "Uniqueness"))
expect_identical(dim(suppressWarnings(predict(x))), c(32L, 2L))
expect_identical(dim(suppressWarnings(predict(x, newdata=mtcars[1:3, 1:7]))), c(3L, 2L))
expect_identical(dim(suppressWarnings(predict(x, newdata = mtcars[1:3, 1:7]))), c(3L, 2L))
})


Expand Down

0 comments on commit 69f4b30

Please sign in to comment.