Skip to content

Commit

Permalink
Fixed spline test to throw error for 15 parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
hugaped committed Jul 3, 2024
1 parent 9a1ee49 commit 37583a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test_prepare.functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ test_that("genspline functions correctly", {

expect_error(genspline(x, spline="ls", knots = -1))
expect_error(genspline(x, spline="ls", knots = c(1,4)), "probs")
expect_error(genspline(x, spline="ls", knots = 5), "unlikely to be able to support it")
expect_error(genspline(x, spline="ls", knots = 15), "unlikely to be able to support it")

# Natural cubic splines
ns <- genspline(x, spline="ns", knots = 1, degree=1)
Expand All @@ -194,7 +194,7 @@ test_that("genspline functions correctly", {

expect_error(genspline(x, spline="ns", knots = -1))
expect_error(genspline(x, spline="ns", knots = c(1,4)), "probs")
expect_error(genspline(x, spline="ns", knots = 5), "unlikely to be able to support it")
expect_error(genspline(x, spline="ns", knots = 15), "unlikely to be able to support it")

# # Restricted cubic splines
# rcs <- genspline(x, spline="rcs", knots = 3)
Expand Down

0 comments on commit 37583a9

Please sign in to comment.