-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests to improve optimise_prevalence.R cover.
Fix (temporary) catch for interval in optimise_s_prevalence().
- Loading branch information
Showing
12 changed files
with
679 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
^Figures* | ||
man/hello.Rd | ||
^LICENSE\.md$ | ||
dependencies/ | ||
^dev_resources/$ | ||
^\.github$ | ||
^PoolPoweR\.Rproj$ | ||
^CHANGELOG.md$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# As util helper functions will be used to catch warnings soon | ||
test_that("interval is >= 0", { | ||
expect_error( | ||
optimise_s_prevalence(prevalence = 0.01, cost_unit = 5, cost_pool = 10, interval = -1), | ||
'interval must be 0 or higher') | ||
expect_equal( | ||
optimise_s_prevalence(prevalence = 0.1, cost_unit = 5, cost_pool = 10, interval = 2), | ||
list(s=5, cost=0.786439, catch =5, s_interval=c(1,25), | ||
cost_interval=c(1.35, 2.262155), catch_interval=c(1,25)), | ||
tolerance = 1e-7) | ||
}) |