aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-10-25 22:11:05 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2022-10-25 22:22:28 +0200
commit553d4b763a79f880e9de138a78de624abb15754e (patch)
treee70978129bda481208066e17a84e0aba849ee988 /tests
parenta8ff8bed72dc537fe70cf2995ea769d3f519f877 (diff)
Avoid another platform dependence
Caused by the fact that printing error model parameters in nlme summaries do not honor the digits argument.
Diffstat (limited to 'tests')
-rw-r--r--tests/testthat/summary_dfop_nlme_1.txt4
-rw-r--r--tests/testthat/test_mixed.R5
2 files changed, 7 insertions, 2 deletions
diff --git a/tests/testthat/summary_dfop_nlme_1.txt b/tests/testthat/summary_dfop_nlme_1.txt
index 773be488..1ea5f3b7 100644
--- a/tests/testthat/summary_dfop_nlme_1.txt
+++ b/tests/testthat/summary_dfop_nlme_1.txt
@@ -54,8 +54,8 @@ Variance function:
Structure: Constant plus proportion of variance covariate
Formula: ~fitted(.)
Parameter estimates:
- const prop
- 0.92275475 -0.04804649
+ const prop
+ 0.9227564 -0.0480500
Backtransformed parameters with asymmetric confidence intervals:
lower est. upper
diff --git a/tests/testthat/test_mixed.R b/tests/testthat/test_mixed.R
index 6fb06656..8f4f3ae3 100644
--- a/tests/testthat/test_mixed.R
+++ b/tests/testthat/test_mixed.R
@@ -10,6 +10,10 @@ test_that("Print methods work", {
test_that("nlme results are reproducible to some degree", {
+ dfop_nlme_1$modelStruct$varStruct$const <-
+ signif(dfop_nlme_1$modelStruct$varStruct$const, 4)
+ dfop_nlme_1$modelStruct$varStruct$prop <-
+ signif(dfop_nlme_1$modelStruct$varStruct$prop, 4)
test_summary <- summary(dfop_nlme_1)
test_summary$nlmeversion <- "Dummy 0.0 for testing"
test_summary$mkinversion <- "Dummy 0.0 for testing"
@@ -18,6 +22,7 @@ test_that("nlme results are reproducible to some degree", {
test_summary$date.summary <- "Dummy date for testing"
test_summary$time <- c(elapsed = "test time 0")
+ print(test_summary, digits = 1)
expect_known_output(print(test_summary, digits = 1), "summary_dfop_nlme_1.txt")
# The biphasic example data illustrate that DFOP parameters are difficult to

Contact - Imprint