Skip to content

Commit

Permalink
Add check_rho() in input_check(). Fixes #32.
Browse files Browse the repository at this point in the history
  • Loading branch information
fredjaya committed Dec 8, 2023
1 parent 0ee223d commit 5655055
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions R/check_input.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ check_input <- function(argument_name, input_value) {
if(argument_name %in% geq0) check_geq(argument_name, input_value, min = 0)
else if(argument_name %in% geq1) check_geq(argument_name, input_value, min = 1)
else if(argument_name %in% range) check_in_range(argument_name, input_value)
else if(argument_name == "correlation") check_rho(input_value)
else if(argument_name == "form") check_form(input_value)
else if(argument_name == "real_scale") check_scale(input_value)
else if(argument_name == "cost_cluster") check_cost_cluster(input_value)
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-fisher_information.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ test_that("fi_pool_cluster() fails when integral input parameters are so extreme
})

test_that("fi_pool_cluster() fails when likelihoods or derivatives do not add up", {
# SLOW (doesn't scale with pool size, number, and vector length)
# Previously did not scale with pool size, number, and vector length
expect_error(
fi_pool_cluster(
pool_size = c(5, 10),
Expand Down

0 comments on commit 5655055

Please sign in to comment.