aboutsummaryrefslogtreecommitdiff
path: root/tests/testthat/setup_script.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-02-28 11:17:56 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2022-02-28 11:17:56 +0100
commitd68f7cc800fe2342642056780b915821dbe113e0 (patch)
tree969298f89c8c76bcb03d6d84186ab302c0fd26d7 /tests/testthat/setup_script.R
parent6b7b93c29115d75bf10c63b61f565a61a2d74498 (diff)
With saemix 3.0 on CRAN there's no need to check for it in tests
Diffstat (limited to 'tests/testthat/setup_script.R')
-rw-r--r--tests/testthat/setup_script.R25
1 files changed, 10 insertions, 15 deletions
diff --git a/tests/testthat/setup_script.R b/tests/testthat/setup_script.R
index 693a2a25..4688b7d7 100644
--- a/tests/testthat/setup_script.R
+++ b/tests/testthat/setup_script.R
@@ -183,28 +183,25 @@ ds_biphasic <- lapply(ds_biphasic_mean, function(ds) {
})
# Mixed model fits
-saemix_available <- FALSE
-if (requireNamespace("saemix", quietly = TRUE)) {
- if(packageVersion("saemix") >= "3.0") saemix_available <- TRUE
-}
mmkin_sfo_1 <- mmkin("SFO", ds_sfo, quiet = TRUE, error_model = "tc", cores = n_cores)
mmkin_dfop_1 <- mmkin("DFOP", ds_dfop, quiet = TRUE, cores = n_cores)
mmkin_biphasic <- mmkin(list("DFOP-SFO" = DFOP_SFO), ds_biphasic, quiet = TRUE, cores = n_cores)
mmkin_biphasic_mixed <- mixed(mmkin_biphasic)
+# nlme
dfop_nlme_1 <- nlme(mmkin_dfop_1)
nlme_biphasic <- nlme(mmkin_biphasic)
-if (saemix_available) {
- sfo_saem_1 <- saem(mmkin_sfo_1, quiet = TRUE, transformations = "saemix")
+# saemix
+sfo_saem_1 <- saem(mmkin_sfo_1, quiet = TRUE, transformations = "saemix")
- dfop_saemix_1 <- saem(mmkin_dfop_1, quiet = TRUE, transformations = "mkin")
- dfop_saemix_2 <- saem(mmkin_dfop_1, quiet = TRUE, transformations = "saemix")
+dfop_saemix_1 <- saem(mmkin_dfop_1, quiet = TRUE, transformations = "mkin")
+dfop_saemix_2 <- saem(mmkin_dfop_1, quiet = TRUE, transformations = "saemix")
- saem_biphasic_m <- saem(mmkin_biphasic, transformations = "mkin", quiet = TRUE)
- saem_biphasic_s <- saem(mmkin_biphasic, transformations = "saemix", quiet = TRUE)
-}
+saem_biphasic_m <- saem(mmkin_biphasic, transformations = "mkin", quiet = TRUE)
+saem_biphasic_s <- saem(mmkin_biphasic, transformations = "saemix", quiet = TRUE)
+# UBA datasets
ds_uba <- lapply(experimental_data_for_UBA_2019[6:10],
function(x) subset(x$data[c("name", "time", "value")]))
names(ds_uba) <- paste("Dataset", 6:10)
@@ -216,7 +213,5 @@ f_uba_mmkin <- mmkin(list("SFO-SFO" = sfo_sfo_uba, "DFOP-SFO" = dfop_sfo_uba),
ds_uba, quiet = TRUE, cores = n_cores)
f_uba_dfop_sfo_mixed <- mixed(f_uba_mmkin[2, ])
-if (saemix_available) {
- f_uba_sfo_sfo_saem <- saem(f_uba_mmkin["SFO-SFO", ], quiet = TRUE, transformations = "saemix")
- f_uba_dfop_sfo_saem <- saem(f_uba_mmkin["DFOP-SFO", ], quiet = TRUE, transformations = "saemix")
-}
+f_uba_sfo_sfo_saem <- saem(f_uba_mmkin["SFO-SFO", ], quiet = TRUE, transformations = "saemix")
+f_uba_dfop_sfo_saem <- saem(f_uba_mmkin["DFOP-SFO", ], quiet = TRUE, transformations = "saemix")

Contact - Imprint