aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-12-19 12:23:08 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2020-12-19 12:23:08 +0100
commite25f0194736a090914c10a9f374946c0b89adc5b (patch)
tree505e4c8843dcf873b70f62b824062b19bc03d8b2 /tests
parent8de6e0c9df935266eccebbc9ff8ff2eef2e819d1 (diff)
Dimethenamid data, normalisation options
Diffstat (limited to 'tests')
-rw-r--r--tests/testthat/experimental_data_for_UBA_2019_mkindsg.txt2
-rw-r--r--tests/testthat/test_f_time_norm.R9
-rw-r--r--tests/testthat/test_mixed.R2
3 files changed, 11 insertions, 2 deletions
diff --git a/tests/testthat/experimental_data_for_UBA_2019_mkindsg.txt b/tests/testthat/experimental_data_for_UBA_2019_mkindsg.txt
index f9287b35..7096f26d 100644
--- a/tests/testthat/experimental_data_for_UBA_2019_mkindsg.txt
+++ b/tests/testthat/experimental_data_for_UBA_2019_mkindsg.txt
@@ -1,5 +1,5 @@
<mkindsg> holding 5 mkinds objects
Title $title: Experimental X
-Occurrene of observed compounds $observed_n:
+Occurrence of observed compounds $observed_n:
parent A1
5 5
diff --git a/tests/testthat/test_f_time_norm.R b/tests/testthat/test_f_time_norm.R
index f9aba58a..ca2ebd99 100644
--- a/tests/testthat/test_f_time_norm.R
+++ b/tests/testthat/test_f_time_norm.R
@@ -8,4 +8,13 @@ test_that("Time step normalisation for a dataset works", {
expect_output(f_time_norm_focus(D24_2014, study_moisture_ref_source = "focus", f_na = 1),
"was set to")
expect_equal(round(D24_2014$f_time_norm, 3), c(1.606, 0.712, 0.716, 0.716, 0.898))
+ expect_output(f_time_norm_focus(dimethenamid_2018), "was set to")
+
+ # Reference values from Dimethenamid RAR 2018 Vol3 B.8
+ expect_equal(round(dimethenamid_2018$f_time_norm, 3),
+ c(1,
+ rep(0.971, 2), # p. 56
+ rep(round(1.329 * 0.924, 3), 2), # p. 51
+ 0.623, 0.768, 0.673) # p. 45
+ )
})
diff --git a/tests/testthat/test_mixed.R b/tests/testthat/test_mixed.R
index 41e8160a..1e96c338 100644
--- a/tests/testthat/test_mixed.R
+++ b/tests/testthat/test_mixed.R
@@ -1,4 +1,4 @@
-context("Nonlinear mixed effects models")
+context("Nonlinear mixed-effects models")
test_that("Parent only models can be fitted using nonlinear mixed effects models", {
expect_error(saem(fits), "Only row objects")

Contact - Imprint