From 479baa00f5514a02f6897ad8c7cf0f44bcedb664 Mon Sep 17 00:00:00 2001 From: Sam Rogers <7007561+rogerssam@users.noreply.github.com> Date: Tue, 21 May 2024 21:24:34 +0930 Subject: [PATCH] Updating tests --- tests/testthat/_snaps/mct/lme4-output.svg | 84 +++ .../resplot/artool-resplot-with-call.svg | 325 ++++++++++ .../_snaps/resplot/artool-resplot.svg | 310 +++++++++ .../_snaps/resplot/resplot-for-lme4.svg | 611 ++++++++++++++++++ .../_snaps/resplot/resplot-for-sommer.svg | 400 ++++++++++++ tests/testthat/_snaps/utility_functions.md | 12 - 6 files changed, 1730 insertions(+), 12 deletions(-) create mode 100644 tests/testthat/_snaps/mct/lme4-output.svg create mode 100644 tests/testthat/_snaps/resplot/artool-resplot-with-call.svg create mode 100644 tests/testthat/_snaps/resplot/artool-resplot.svg create mode 100644 tests/testthat/_snaps/resplot/resplot-for-lme4.svg create mode 100644 tests/testthat/_snaps/resplot/resplot-for-sommer.svg diff --git a/tests/testthat/_snaps/mct/lme4-output.svg b/tests/testthat/_snaps/mct/lme4-output.svg new file mode 100644 index 0000000..0c1a4c3 --- /dev/null +++ b/tests/testthat/_snaps/mct/lme4-output.svg @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +a +b +bc +c + + + + + + + +80 +100 +120 +140 + + + + + + + + +0_cwt +0.2_cwt +0.4_cwt +0.6_cwt +Predicted yield +lme4 output + + diff --git a/tests/testthat/_snaps/resplot/artool-resplot-with-call.svg b/tests/testthat/_snaps/resplot/artool-resplot-with-call.svg new file mode 100644 index 0000000..45a82ea --- /dev/null +++ b/tests/testthat/_snaps/resplot/artool-resplot-with-call.svg @@ -0,0 +1,325 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +ARTool::art(formula = medmolarity ~ name + (1 | rep), +data = dat.art) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.0 +2.5 +5.0 +7.5 + + + + + + + + + +-2 +-1 +0 +1 +2 +Standardised Residual +Frequency +A + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +-2 +-1 +0 +1 +2 + + + + + + + + + + +-2 +-1 +0 +1 +2 +Theoretical +Standardised Residual +B + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +-2 +-1 +0 +1 +2 + + + + + + + + + + +0.0 +0.5 +1.0 +1.5 +2.0 +Fitted Value +Standardised Residual +Shapiro-Wilk normality test p-value: 0.3409 +The residuals appear to be normally distributed. (n = 35) +C + + diff --git a/tests/testthat/_snaps/resplot/artool-resplot.svg b/tests/testthat/_snaps/resplot/artool-resplot.svg new file mode 100644 index 0000000..c9611ac --- /dev/null +++ b/tests/testthat/_snaps/resplot/artool-resplot.svg @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.0 +2.5 +5.0 +7.5 + + + + + + + + + +-2 +-1 +0 +1 +2 +Standardised Residual +Frequency +A + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +-2 +-1 +0 +1 +2 + + + + + + + + + + +-2 +-1 +0 +1 +2 +Theoretical +Standardised Residual +B + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +-2 +-1 +0 +1 +2 + + + + + + + + + + +0.0 +0.5 +1.0 +1.5 +2.0 +Fitted Value +Standardised Residual +Shapiro-Wilk normality test p-value: 0.3409 +The residuals appear to be normally distributed. (n = 35) +C + + diff --git a/tests/testthat/_snaps/resplot/resplot-for-lme4.svg b/tests/testthat/_snaps/resplot/resplot-for-lme4.svg new file mode 100644 index 0000000..341926b --- /dev/null +++ b/tests/testthat/_snaps/resplot/resplot-for-lme4.svg @@ -0,0 +1,611 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +lme4::lmer(formula = Reaction ~ Days + (Days | Subject), +data = lme4::sleepstudy) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 + + + + + + + + + + +-5.0 +-2.5 +0.0 +2.5 +5.0 +Standardised Residual +Frequency +A + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +-2.5 +0.0 +2.5 +5.0 + + + + + + + + + + + +-3 +-2 +-1 +0 +1 +2 +3 +Theoretical +Standardised Residual +B + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +-2.5 +0.0 +2.5 +5.0 + + + + + + + +200 +300 +400 +Fitted Value +Standardised Residual +Shapiro-Wilk normality test p-value: 0 +The residuals do not appear to be normally distributed. (n = 180) +C + + diff --git a/tests/testthat/_snaps/resplot/resplot-for-sommer.svg b/tests/testthat/_snaps/resplot/resplot-for-sommer.svg new file mode 100644 index 0000000..8419d2a --- /dev/null +++ b/tests/testthat/_snaps/resplot/resplot-for-sommer.svg @@ -0,0 +1,400 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +mmer(fixed = yield ~ Nitrogen + Variety + Nitrogen:Variety, +random = ~Blocks + Blocks:Wplots, rcov = ~units) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +5 +10 + + + + + + + + +-2 +-1 +0 +1 +2 +Standardised Residual +Frequency +A + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +-2 +-1 +0 +1 +2 + + + + + + + + + + +-2 +-1 +0 +1 +2 +Theoretical +Standardised Residual +B + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +-2 +-1 +0 +1 +2 + + + + + + + + + + + +60 +80 +100 +120 +140 +160 +Fitted Value +Standardised Residual +Shapiro-Wilk normality test p-value: 0.2698 +The residuals appear to be normally distributed. (n = 72) +C + + diff --git a/tests/testthat/_snaps/utility_functions.md b/tests/testthat/_snaps/utility_functions.md index 45f9e0c..3d06351 100644 --- a/tests/testthat/_snaps/utility_functions.md +++ b/tests/testthat/_snaps/utility_functions.md @@ -2,16 +2,4 @@ Code biometryassist:::.onAttach(pkg = "biometryassist") - Message - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - | biometryassist version 1.1.4 | - | Authors: Sharon Nielsen, Sam Rogers, Annie Conway | - | Developed at the University of Adelaide with funding provided | - | by the Australian Grains Research and Development Corporation. | - | Package website: https://biometryhub.github.io/biometryassist | - | | - | If you have used this package in your work, please cite it. | - | Type 'citation('biometryassist')' for the citation details. | - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -