From 91172890c83dbee5a3801d4d0b120f9678496d3c Mon Sep 17 00:00:00 2001 From: thibautjombart Date: Fri, 6 Dec 2024 16:00:18 +0100 Subject: [PATCH 1/4] updated plot snapshots - all good --- .../_snaps/plots/basic-example-plot.svg | 14 ++++----- .../_snaps/plots/evd-proj-box-no-outliers.svg | 14 ++++----- .../plots/evd-proj-no-box-custom-lines.svg | 16 +++++----- .../_snaps/plots/evd-proj-no-ribbon.svg | 16 +++++----- .../_snaps/plots/evd-proj-red-box.svg | 14 ++++----- ...oj-with-incidence-incidence-and-custom.svg | 30 +++++++++---------- ...d-proj-with-incidence-incidence-no-box.svg | 14 ++++----- .../evd-proj-with-incidence-incidence.svg | 16 +++++----- tests/testthat/_snaps/plots/evd-proj.svg | 16 +++++----- 9 files changed, 75 insertions(+), 75 deletions(-) diff --git a/tests/testthat/_snaps/plots/basic-example-plot.svg b/tests/testthat/_snaps/plots/basic-example-plot.svg index 600cf92..baa9fd8 100644 --- a/tests/testthat/_snaps/plots/basic-example-plot.svg +++ b/tests/testthat/_snaps/plots/basic-example-plot.svg @@ -72,19 +72,19 @@ Predicted incidence quantile - + - + - + - + - + - + - + 1% 5% diff --git a/tests/testthat/_snaps/plots/evd-proj-box-no-outliers.svg b/tests/testthat/_snaps/plots/evd-proj-box-no-outliers.svg index afb8987..2ac1f5f 100644 --- a/tests/testthat/_snaps/plots/evd-proj-box-no-outliers.svg +++ b/tests/testthat/_snaps/plots/evd-proj-box-no-outliers.svg @@ -406,19 +406,19 @@ Predicted incidence quantile - + - + - + - + - + - + - + 1% 5% diff --git a/tests/testthat/_snaps/plots/evd-proj-no-box-custom-lines.svg b/tests/testthat/_snaps/plots/evd-proj-no-box-custom-lines.svg index 755e147..8f80ccd 100644 --- a/tests/testthat/_snaps/plots/evd-proj-no-box-custom-lines.svg +++ b/tests/testthat/_snaps/plots/evd-proj-no-box-custom-lines.svg @@ -21,7 +21,7 @@ - + @@ -83,19 +83,19 @@ Predicted incidence quantile - + - + - + - + - + - + - + 1% 5% diff --git a/tests/testthat/_snaps/plots/evd-proj-no-ribbon.svg b/tests/testthat/_snaps/plots/evd-proj-no-ribbon.svg index 9a281f0..1e94472 100644 --- a/tests/testthat/_snaps/plots/evd-proj-no-ribbon.svg +++ b/tests/testthat/_snaps/plots/evd-proj-no-ribbon.svg @@ -21,7 +21,7 @@ - + @@ -80,19 +80,19 @@ Predicted incidence quantile - + - + - + - + - + - + - + 1% 5% diff --git a/tests/testthat/_snaps/plots/evd-proj-red-box.svg b/tests/testthat/_snaps/plots/evd-proj-red-box.svg index a8fee77..f0d4c0f 100644 --- a/tests/testthat/_snaps/plots/evd-proj-red-box.svg +++ b/tests/testthat/_snaps/plots/evd-proj-red-box.svg @@ -406,19 +406,19 @@ Predicted incidence quantile - + - + - + - + - + - + - + 1% 5% diff --git a/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-and-custom.svg b/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-and-custom.svg index 6adf373..fe1ae06 100644 --- a/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-and-custom.svg +++ b/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-and-custom.svg @@ -280,35 +280,35 @@ Daily incidence quantile - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 0.1% 1% diff --git a/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-no-box.svg b/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-no-box.svg index 7d8ace8..00976db 100644 --- a/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-no-box.svg +++ b/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-no-box.svg @@ -796,19 +796,19 @@ Daily incidence quantile - + - + - + - + - + - + - + 1% 5% diff --git a/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence.svg b/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence.svg index aaee8a1..959f9af 100644 --- a/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence.svg +++ b/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence.svg @@ -21,7 +21,7 @@ - + @@ -473,19 +473,19 @@ Daily incidence quantile - + - + - + - + - + - + - + 1% 5% diff --git a/tests/testthat/_snaps/plots/evd-proj.svg b/tests/testthat/_snaps/plots/evd-proj.svg index 0a2f67f..1ddfd57 100644 --- a/tests/testthat/_snaps/plots/evd-proj.svg +++ b/tests/testthat/_snaps/plots/evd-proj.svg @@ -21,7 +21,7 @@ - + @@ -83,19 +83,19 @@ Predicted incidence quantile - + - + - + - + - + - + - + 1% 5% From e6a1355f54b97736a85e5f275c1b3ab8000e38f0 Mon Sep 17 00:00:00 2001 From: thibautjombart Date: Fri, 6 Dec 2024 16:15:52 +0100 Subject: [PATCH 2/4] fixing issues in date typeas --- .../_snaps/plots/evd-proj-box-no-outliers.svg | 431 --------- .../_snaps/plots/evd-proj-box-only.svg | 398 --------- .../evd-proj-full-red-ribbon-narrow-range.svg | 80 -- .../plots/evd-proj-no-box-custom-lines.svg | 108 --- .../_snaps/plots/evd-proj-no-ribbon.svg | 105 --- .../_snaps/plots/evd-proj-red-box.svg | 431 --------- .../_snaps/plots/evd-proj-red-ribbon.svg | 78 -- .../_snaps/plots/evd-proj-ribbon-only.svg | 78 -- ...oj-with-incidence-incidence-and-custom.svg | 329 ------- ...proj-with-incidence-incidence-box-only.svg | 788 ----------------- ...d-proj-with-incidence-incidence-no-box.svg | 821 ------------------ .../evd-proj-with-incidence-incidence.svg | 498 ----------- tests/testthat/_snaps/plots/evd-proj.svg | 108 --- tests/testthat/test-project.R | 6 +- 14 files changed, 3 insertions(+), 4256 deletions(-) delete mode 100644 tests/testthat/_snaps/plots/evd-proj-box-no-outliers.svg delete mode 100644 tests/testthat/_snaps/plots/evd-proj-box-only.svg delete mode 100644 tests/testthat/_snaps/plots/evd-proj-full-red-ribbon-narrow-range.svg delete mode 100644 tests/testthat/_snaps/plots/evd-proj-no-box-custom-lines.svg delete mode 100644 tests/testthat/_snaps/plots/evd-proj-no-ribbon.svg delete mode 100644 tests/testthat/_snaps/plots/evd-proj-red-box.svg delete mode 100644 tests/testthat/_snaps/plots/evd-proj-red-ribbon.svg delete mode 100644 tests/testthat/_snaps/plots/evd-proj-ribbon-only.svg delete mode 100644 tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-and-custom.svg delete mode 100644 tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-box-only.svg delete mode 100644 tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-no-box.svg delete mode 100644 tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence.svg delete mode 100644 tests/testthat/_snaps/plots/evd-proj.svg diff --git a/tests/testthat/_snaps/plots/evd-proj-box-no-outliers.svg b/tests/testthat/_snaps/plots/evd-proj-box-no-outliers.svg deleted file mode 100644 index 2ac1f5f..0000000 --- a/tests/testthat/_snaps/plots/evd-proj-box-no-outliers.svg +++ /dev/null @@ -1,431 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 -25 -50 -75 -100 - - - - - - - - - - -Jul 15 -Aug 01 -Aug 15 -Sep 01 -Sep 15 -Predicted incidence - -quantile - - - - - - - - - - - - - - -1% -5% -10% -50% -90% -95% -99% - - diff --git a/tests/testthat/_snaps/plots/evd-proj-box-only.svg b/tests/testthat/_snaps/plots/evd-proj-box-only.svg deleted file mode 100644 index 5956bbd..0000000 --- a/tests/testthat/_snaps/plots/evd-proj-box-only.svg +++ /dev/null @@ -1,398 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 -25 -50 -75 -100 - - - - - - - - - - -Jul 15 -Aug 01 -Aug 15 -Sep 01 -Sep 15 -Predicted incidence - - diff --git a/tests/testthat/_snaps/plots/evd-proj-full-red-ribbon-narrow-range.svg b/tests/testthat/_snaps/plots/evd-proj-full-red-ribbon-narrow-range.svg deleted file mode 100644 index ae4ff53..0000000 --- a/tests/testthat/_snaps/plots/evd-proj-full-red-ribbon-narrow-range.svg +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -10 -20 -30 -40 -50 - - - - - - - - - - -Jul 15 -Aug 01 -Aug 15 -Sep 01 -Sep 15 -Predicted incidence - - diff --git a/tests/testthat/_snaps/plots/evd-proj-no-box-custom-lines.svg b/tests/testthat/_snaps/plots/evd-proj-no-box-custom-lines.svg deleted file mode 100644 index 8f80ccd..0000000 --- a/tests/testthat/_snaps/plots/evd-proj-no-box-custom-lines.svg +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 -20 -40 -60 -80 - - - - - - - - - - -Jul 15 -Aug 01 -Aug 15 -Sep 01 -Sep 15 -Predicted incidence - -quantile - - - - - - - - - - - - - - -1% -5% -10% -50% -90% -95% -99% - - diff --git a/tests/testthat/_snaps/plots/evd-proj-no-ribbon.svg b/tests/testthat/_snaps/plots/evd-proj-no-ribbon.svg deleted file mode 100644 index 1e94472..0000000 --- a/tests/testthat/_snaps/plots/evd-proj-no-ribbon.svg +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 -20 -40 -60 -80 - - - - - - - - - - -Jul 15 -Aug 01 -Aug 15 -Sep 01 -Sep 15 -Predicted incidence - -quantile - - - - - - - - - - - - - - -1% -5% -10% -50% -90% -95% -99% - - diff --git a/tests/testthat/_snaps/plots/evd-proj-red-box.svg b/tests/testthat/_snaps/plots/evd-proj-red-box.svg deleted file mode 100644 index f0d4c0f..0000000 --- a/tests/testthat/_snaps/plots/evd-proj-red-box.svg +++ /dev/null @@ -1,431 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 -25 -50 -75 -100 - - - - - - - - - - -Jul 15 -Aug 01 -Aug 15 -Sep 01 -Sep 15 -Predicted incidence - -quantile - - - - - - - - - - - - - - -1% -5% -10% -50% -90% -95% -99% - - diff --git a/tests/testthat/_snaps/plots/evd-proj-red-ribbon.svg b/tests/testthat/_snaps/plots/evd-proj-red-ribbon.svg deleted file mode 100644 index cbfe036..0000000 --- a/tests/testthat/_snaps/plots/evd-proj-red-ribbon.svg +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 -25 -50 -75 -100 - - - - - - - - - - -Jul 15 -Aug 01 -Aug 15 -Sep 01 -Sep 15 -Predicted incidence - - diff --git a/tests/testthat/_snaps/plots/evd-proj-ribbon-only.svg b/tests/testthat/_snaps/plots/evd-proj-ribbon-only.svg deleted file mode 100644 index 29906f6..0000000 --- a/tests/testthat/_snaps/plots/evd-proj-ribbon-only.svg +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 -25 -50 -75 -100 - - - - - - - - - - -Jul 15 -Aug 01 -Aug 15 -Sep 01 -Sep 15 -Predicted incidence - - diff --git a/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-and-custom.svg b/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-and-custom.svg deleted file mode 100644 index fe1ae06..0000000 --- a/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-and-custom.svg +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 -25 -50 -75 - - - - - - - -Apr 2014 -Jul 2014 -Oct 2014 -Daily incidence - -quantile - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0.1% -1% -5% -10% -20% -30% -40% -50% -60% -70% -80% -90% -95% -99% -99.9% - - diff --git a/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-box-only.svg b/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-box-only.svg deleted file mode 100644 index c3a9ad3..0000000 --- a/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-box-only.svg +++ /dev/null @@ -1,788 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 -25 -50 -75 -100 - - - - - - - - - - -Apr 2014 -Jul 2014 -Oct 2014 -Jan 2015 -Apr 2015 -Daily incidence - - diff --git a/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-no-box.svg b/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-no-box.svg deleted file mode 100644 index 00976db..0000000 --- a/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-no-box.svg +++ /dev/null @@ -1,821 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 -25 -50 -75 -100 - - - - - - - - - - -Apr 2014 -Jul 2014 -Oct 2014 -Jan 2015 -Apr 2015 -Daily incidence - -quantile - - - - - - - - - - - - - - -1% -5% -10% -50% -90% -95% -99% - - diff --git a/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence.svg b/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence.svg deleted file mode 100644 index 959f9af..0000000 --- a/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence.svg +++ /dev/null @@ -1,498 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 -20 -40 -60 -80 - - - - - - - - - - -Apr 2014 -Jul 2014 -Oct 2014 -Jan 2015 -Apr 2015 -Daily incidence - -quantile - - - - - - - - - - - - - - -1% -5% -10% -50% -90% -95% -99% - - diff --git a/tests/testthat/_snaps/plots/evd-proj.svg b/tests/testthat/_snaps/plots/evd-proj.svg deleted file mode 100644 index 1ddfd57..0000000 --- a/tests/testthat/_snaps/plots/evd-proj.svg +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0 -20 -40 -60 -80 - - - - - - - - - - -Jul 15 -Aug 01 -Aug 15 -Sep 01 -Sep 15 -Predicted incidence - -quantile - - - - - - - - - - - - - - -1% -5% -10% -50% -90% -95% -99% - - diff --git a/tests/testthat/test-project.R b/tests/testthat/test-project.R index 230b97d..c8deed4 100644 --- a/tests/testthat/test-project.R +++ b/tests/testthat/test-project.R @@ -12,7 +12,7 @@ test_that("Projections can be performed for a single day", { model = "poisson" ) - expect_identical(get_dates(p), as.Date("2020-01-24")) + expect_equal(get_dates(p), as.Date("2020-01-24")) }) @@ -33,7 +33,7 @@ test_that("Projections can be performed for a single day", { model = "poisson" ) - expect_identical(get_dates(p), as.Date("2020-01-24") + 0:1) + expect_equal(get_dates(p), as.Date("2020-01-24") + 0:1) expect_identical(ncol(p), 1L) }) @@ -55,7 +55,7 @@ test_that("Projections can be performed for a single day and single simulation", model = "poisson" ) - expect_identical(get_dates(p), as.Date("2020-01-24")) + expect_equal(get_dates(p), as.Date("2020-01-24")) expect_identical(ncol(p), 1L) }) From 7521a1d2a9393f6655d62f2b9b82dd06ea1e23ee Mon Sep 17 00:00:00 2001 From: thibautjombart Date: Fri, 6 Dec 2024 16:17:33 +0100 Subject: [PATCH 3/4] updating snapshots --- .../_snaps/plots/evd-proj-box-no-outliers.svg | 431 +++++++++ .../_snaps/plots/evd-proj-box-only.svg | 398 +++++++++ .../evd-proj-full-red-ribbon-narrow-range.svg | 80 ++ .../plots/evd-proj-no-box-custom-lines.svg | 108 +++ .../_snaps/plots/evd-proj-no-ribbon.svg | 105 +++ .../_snaps/plots/evd-proj-red-box.svg | 431 +++++++++ .../_snaps/plots/evd-proj-red-ribbon.svg | 78 ++ .../_snaps/plots/evd-proj-ribbon-only.svg | 78 ++ ...oj-with-incidence-incidence-and-custom.svg | 329 +++++++ ...proj-with-incidence-incidence-box-only.svg | 788 +++++++++++++++++ ...d-proj-with-incidence-incidence-no-box.svg | 821 ++++++++++++++++++ .../evd-proj-with-incidence-incidence.svg | 498 +++++++++++ tests/testthat/_snaps/plots/evd-proj.svg | 108 +++ 13 files changed, 4253 insertions(+) create mode 100644 tests/testthat/_snaps/plots/evd-proj-box-no-outliers.svg create mode 100644 tests/testthat/_snaps/plots/evd-proj-box-only.svg create mode 100644 tests/testthat/_snaps/plots/evd-proj-full-red-ribbon-narrow-range.svg create mode 100644 tests/testthat/_snaps/plots/evd-proj-no-box-custom-lines.svg create mode 100644 tests/testthat/_snaps/plots/evd-proj-no-ribbon.svg create mode 100644 tests/testthat/_snaps/plots/evd-proj-red-box.svg create mode 100644 tests/testthat/_snaps/plots/evd-proj-red-ribbon.svg create mode 100644 tests/testthat/_snaps/plots/evd-proj-ribbon-only.svg create mode 100644 tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-and-custom.svg create mode 100644 tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-box-only.svg create mode 100644 tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-no-box.svg create mode 100644 tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence.svg create mode 100644 tests/testthat/_snaps/plots/evd-proj.svg diff --git a/tests/testthat/_snaps/plots/evd-proj-box-no-outliers.svg b/tests/testthat/_snaps/plots/evd-proj-box-no-outliers.svg new file mode 100644 index 0000000..2ac1f5f --- /dev/null +++ b/tests/testthat/_snaps/plots/evd-proj-box-no-outliers.svg @@ -0,0 +1,431 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +25 +50 +75 +100 + + + + + + + + + + +Jul 15 +Aug 01 +Aug 15 +Sep 01 +Sep 15 +Predicted incidence + +quantile + + + + + + + + + + + + + + +1% +5% +10% +50% +90% +95% +99% + + diff --git a/tests/testthat/_snaps/plots/evd-proj-box-only.svg b/tests/testthat/_snaps/plots/evd-proj-box-only.svg new file mode 100644 index 0000000..5956bbd --- /dev/null +++ b/tests/testthat/_snaps/plots/evd-proj-box-only.svg @@ -0,0 +1,398 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +25 +50 +75 +100 + + + + + + + + + + +Jul 15 +Aug 01 +Aug 15 +Sep 01 +Sep 15 +Predicted incidence + + diff --git a/tests/testthat/_snaps/plots/evd-proj-full-red-ribbon-narrow-range.svg b/tests/testthat/_snaps/plots/evd-proj-full-red-ribbon-narrow-range.svg new file mode 100644 index 0000000..ae4ff53 --- /dev/null +++ b/tests/testthat/_snaps/plots/evd-proj-full-red-ribbon-narrow-range.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +10 +20 +30 +40 +50 + + + + + + + + + + +Jul 15 +Aug 01 +Aug 15 +Sep 01 +Sep 15 +Predicted incidence + + diff --git a/tests/testthat/_snaps/plots/evd-proj-no-box-custom-lines.svg b/tests/testthat/_snaps/plots/evd-proj-no-box-custom-lines.svg new file mode 100644 index 0000000..8f80ccd --- /dev/null +++ b/tests/testthat/_snaps/plots/evd-proj-no-box-custom-lines.svg @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 + + + + + + + + + + +Jul 15 +Aug 01 +Aug 15 +Sep 01 +Sep 15 +Predicted incidence + +quantile + + + + + + + + + + + + + + +1% +5% +10% +50% +90% +95% +99% + + diff --git a/tests/testthat/_snaps/plots/evd-proj-no-ribbon.svg b/tests/testthat/_snaps/plots/evd-proj-no-ribbon.svg new file mode 100644 index 0000000..1e94472 --- /dev/null +++ b/tests/testthat/_snaps/plots/evd-proj-no-ribbon.svg @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 + + + + + + + + + + +Jul 15 +Aug 01 +Aug 15 +Sep 01 +Sep 15 +Predicted incidence + +quantile + + + + + + + + + + + + + + +1% +5% +10% +50% +90% +95% +99% + + diff --git a/tests/testthat/_snaps/plots/evd-proj-red-box.svg b/tests/testthat/_snaps/plots/evd-proj-red-box.svg new file mode 100644 index 0000000..f0d4c0f --- /dev/null +++ b/tests/testthat/_snaps/plots/evd-proj-red-box.svg @@ -0,0 +1,431 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +25 +50 +75 +100 + + + + + + + + + + +Jul 15 +Aug 01 +Aug 15 +Sep 01 +Sep 15 +Predicted incidence + +quantile + + + + + + + + + + + + + + +1% +5% +10% +50% +90% +95% +99% + + diff --git a/tests/testthat/_snaps/plots/evd-proj-red-ribbon.svg b/tests/testthat/_snaps/plots/evd-proj-red-ribbon.svg new file mode 100644 index 0000000..cbfe036 --- /dev/null +++ b/tests/testthat/_snaps/plots/evd-proj-red-ribbon.svg @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +25 +50 +75 +100 + + + + + + + + + + +Jul 15 +Aug 01 +Aug 15 +Sep 01 +Sep 15 +Predicted incidence + + diff --git a/tests/testthat/_snaps/plots/evd-proj-ribbon-only.svg b/tests/testthat/_snaps/plots/evd-proj-ribbon-only.svg new file mode 100644 index 0000000..29906f6 --- /dev/null +++ b/tests/testthat/_snaps/plots/evd-proj-ribbon-only.svg @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +25 +50 +75 +100 + + + + + + + + + + +Jul 15 +Aug 01 +Aug 15 +Sep 01 +Sep 15 +Predicted incidence + + diff --git a/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-and-custom.svg b/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-and-custom.svg new file mode 100644 index 0000000..fe1ae06 --- /dev/null +++ b/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-and-custom.svg @@ -0,0 +1,329 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +25 +50 +75 + + + + + + + +Apr 2014 +Jul 2014 +Oct 2014 +Daily incidence + +quantile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.1% +1% +5% +10% +20% +30% +40% +50% +60% +70% +80% +90% +95% +99% +99.9% + + diff --git a/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-box-only.svg b/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-box-only.svg new file mode 100644 index 0000000..c3a9ad3 --- /dev/null +++ b/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-box-only.svg @@ -0,0 +1,788 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +25 +50 +75 +100 + + + + + + + + + + +Apr 2014 +Jul 2014 +Oct 2014 +Jan 2015 +Apr 2015 +Daily incidence + + diff --git a/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-no-box.svg b/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-no-box.svg new file mode 100644 index 0000000..00976db --- /dev/null +++ b/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence-no-box.svg @@ -0,0 +1,821 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +25 +50 +75 +100 + + + + + + + + + + +Apr 2014 +Jul 2014 +Oct 2014 +Jan 2015 +Apr 2015 +Daily incidence + +quantile + + + + + + + + + + + + + + +1% +5% +10% +50% +90% +95% +99% + + diff --git a/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence.svg b/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence.svg new file mode 100644 index 0000000..959f9af --- /dev/null +++ b/tests/testthat/_snaps/plots/evd-proj-with-incidence-incidence.svg @@ -0,0 +1,498 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 + + + + + + + + + + +Apr 2014 +Jul 2014 +Oct 2014 +Jan 2015 +Apr 2015 +Daily incidence + +quantile + + + + + + + + + + + + + + +1% +5% +10% +50% +90% +95% +99% + + diff --git a/tests/testthat/_snaps/plots/evd-proj.svg b/tests/testthat/_snaps/plots/evd-proj.svg new file mode 100644 index 0000000..1ddfd57 --- /dev/null +++ b/tests/testthat/_snaps/plots/evd-proj.svg @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 + + + + + + + + + + +Jul 15 +Aug 01 +Aug 15 +Sep 01 +Sep 15 +Predicted incidence + +quantile + + + + + + + + + + + + + + +1% +5% +10% +50% +90% +95% +99% + + From c2c0f2b150fcc0c32d60cee17cb0f41cbc64a60b Mon Sep 17 00:00:00 2001 From: thibautjombart Date: Fri, 6 Dec 2024 16:26:40 +0100 Subject: [PATCH 4/4] fixing example of summary; uping version --- .Rbuildignore | 2 +- DESCRIPTION | 4 ++-- NEWS.md | 9 +++++++++ R/summary.R | 1 + man/summary.projections.Rd | 37 +++++++++++++++++++------------------ 5 files changed, 32 insertions(+), 21 deletions(-) diff --git a/.Rbuildignore b/.Rbuildignore index 89aa541..045954b 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -12,5 +12,5 @@ ^figure* ^docs* .*tar.gz$ - +^README.html$ ^\.github$ diff --git a/DESCRIPTION b/DESCRIPTION index 2d3616a..2671b10 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: projections Title: Project Future Case Incidence -Version: 0.6.0 +Version: 0.6.1 Authors@R: c(person(given = "Thibaut", family = "Jombart", @@ -46,7 +46,7 @@ Imports: incidence (>= 1.4.1), ggplot2, methods -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.2 Roxygen: list(markdown = TRUE) URL: https://www.repidemicsconsortium.org/projections/ BugReports: https://github.com/reconhub/projections/issues diff --git a/NEWS.md b/NEWS.md index c7e4536..88c626d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,12 @@ +# projections 0.6.1 + +## Fixes and improvements + +- fixed tests of dates due failing due to changes in `as.Date()` +- fixed example in the manpage of `summary.projection` + + + # projections 0.6.0 ## Fixes and improvements diff --git a/R/summary.R b/R/summary.R index 8e0f79e..a48aa87 100644 --- a/R/summary.R +++ b/R/summary.R @@ -26,6 +26,7 @@ #' #' @param ... only preesnt for compatibility with the generic #' +#' @examples #' if (require(incidence)) { #' i <- incidence::incidence(as.Date('2020-01-23')) #' si <- c(0.2, 0.5, 0.2, 0.1) diff --git a/man/summary.projections.Rd b/man/summary.projections.Rd index 2bef359..5dbd0e0 100644 --- a/man/summary.projections.Rd +++ b/man/summary.projections.Rd @@ -28,30 +28,31 @@ computed; ignored if \code{FALSE} or of length 0} \item{max}{a \code{logical} indicating of the maximum should be computed} -\item{...}{only preesnt for compatibility with the generic - -if (require(incidence)) { -i <- incidence::incidence(as.Date('2020-01-23')) -si <- c(0.2, 0.5, 0.2, 0.1) -R0 <- 2 - -p <- project(x = i, -si = si, -R = R0, -n_sim = 2, -R_fix_within = TRUE, -n_days = 10, -model = "poisson" -) -summary(p) - -}} +\item{...}{only preesnt for compatibility with the generic} } \description{ This method summarises predicted epidemic trajectories contained in a \code{projections} object by days, deriving the mean, standard deviation, and user-specified quantiles for each day. } +\examples{ +if (require(incidence)) { + i <- incidence::incidence(as.Date('2020-01-23')) + si <- c(0.2, 0.5, 0.2, 0.1) + R0 <- 2 + + p <- project(x = i, + si = si, + R = R0, + n_sim = 2, + R_fix_within = TRUE, + n_days = 10, + model = "poisson" + ) + summary(p) + +} +} \author{ Thibaut Jombart }