diff options
author | Johannes Ranke <johannes.ranke@jrwb.de> | 2025-02-16 17:27:18 +0100 |
---|---|---|
committer | Johannes Ranke <johannes.ranke@jrwb.de> | 2025-02-16 17:29:28 +0100 |
commit | 4f62f39b8979cb3a5c52d65d425e530dc0770665 (patch) | |
tree | 895d4bde0773a600943e5c308e17651c12358a67 /tests | |
parent | 44c30938872bd7cc80a4c84dd4db593e26000fce (diff) |
The special case occurs if not observed data for time zero
are available. Fixes #16. Write NEWS and update docs.
A lot of html was regenerated, because I had checked out
the main branch in between, which made pkgdown believe that
I have changed the help files.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testthat/test_deSolve.R | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/testthat/test_deSolve.R b/tests/testthat/test_deSolve.R new file mode 100644 index 00000000..3d15de35 --- /dev/null +++ b/tests/testthat/test_deSolve.R @@ -0,0 +1,19 @@ +context("Solutions with deSolve") + +test_that("Solutions with deSolve work if we have no observations at time zero", { + skip_on_cran() + + # For testing purposes, we replace 0 values in the time column with 0.1 + # This confused mkinfit with solution_type "deSolve" up to version 0.1.3.0 + FOCUS_D_nozero <- FOCUS_D + FOCUS_D_nozero[FOCUS_D$time == 0, "time"] <- c(0.1, 0.1) + + f_sfo_sfo_nozero <- mkinfit(SFO_SFO, FOCUS_D_nozero, quiet = TRUE) + f_sfo_sfo_nozero_deSolve <- mkinfit(SFO_SFO, FOCUS_D_nozero, + solution_type = "deSolve", quiet = TRUE) + expect_equal( + parms(f_sfo_sfo_nozero), + parms(f_sfo_sfo_nozero_deSolve) + ) +}) + |