From 8ce700f902d1722250e44bc913266628ad7cb65d Mon Sep 17 00:00:00 2001 From: Pedro Aphalo Date: Sun, 5 Nov 2023 23:29:49 +0200 Subject: [PATCH] Rebuild and test --- NEWS.md | 1 + .../stat-multcomp-bars-dunnet.new.svg | 88 -- .../stat-multcomp-bars-dunnet.svg | 6 +- .../stat-multcomp-bars-tukey.new.svg | 111 --- .../stat-multcomp-bars-tukey.svg | 12 +- .../stat-multcomp-bonferroni-dunnet.new.svg | 88 -- .../stat-multcomp-bonferroni-dunnet.svg | 6 +- .../stat-multcomp-bonferroni-tukey.new.svg | 111 --- .../stat-multcomp-bonferroni-tukey.svg | 12 +- .../stat-multcomp-lm-char.new.svg | 111 --- .../stat-multcomp/stat-multcomp-lm-char.svg | 12 +- .../stat-multcomp-lm-fun.new.svg | 111 --- .../stat-multcomp/stat-multcomp-lm-fun.svg | 12 +- .../stat-multcomp-noload-more.new.svg | 137 --- .../stat-multcomp-noload-more.svg | 12 +- .../stat-multcomp-noload.new.svg | 111 --- .../stat-multcomp/stat-multcomp-noload.svg | 12 +- .../stat-multcomp-p-digits2.new.svg | 111 --- .../stat-multcomp/stat-multcomp-p-digits2.svg | 12 +- .../stat-multcomp-p-digits6.new.svg | 111 --- .../stat-multcomp/stat-multcomp-p-digits6.svg | 12 +- .../stat-multcomp-rlm-char.new.svg | 111 --- .../stat-multcomp/stat-multcomp-rlm-char.svg | 12 +- .../stat-multcomp-rlm-fun.new.svg | 111 --- .../stat-multcomp/stat-multcomp-rlm-fun.svg | 12 +- .../stat-multcomp-y-bottom-num-dunnet.new.svg | 88 -- .../stat-multcomp-y-bottom-num-dunnet.svg | 6 +- .../stat-multcomp-y-bottom-num-tukey.new.svg | 111 --- .../stat-multcomp-y-bottom-num-tukey.svg | 12 +- .../stat-multcomp-y-top-dunnet.new.svg | 88 -- .../stat-multcomp-y-top-dunnet.svg | 6 +- .../stat-multcomp-y-top-num-dunnet.new.svg | 92 -- .../stat-multcomp-y-top-num-dunnet.svg | 6 +- .../stat-multcomp-y-top-num-tukey.new.svg | 109 --- .../stat-multcomp-y-top-num-tukey.svg | 12 +- .../stat-multcomp-y-top-tukey.new.svg | 111 --- .../stat-multcomp-y-top-tukey.svg | 12 +- vignettes/model-based-annotations.R | 92 +- vignettes/model-based-annotations.html | 785 ++++++++++++++---- 39 files changed, 763 insertions(+), 2212 deletions(-) delete mode 100644 tests/testthat/_snaps/stat-multcomp/stat-multcomp-bars-dunnet.new.svg delete mode 100644 tests/testthat/_snaps/stat-multcomp/stat-multcomp-bars-tukey.new.svg delete mode 100644 tests/testthat/_snaps/stat-multcomp/stat-multcomp-bonferroni-dunnet.new.svg delete mode 100644 tests/testthat/_snaps/stat-multcomp/stat-multcomp-bonferroni-tukey.new.svg delete mode 100644 tests/testthat/_snaps/stat-multcomp/stat-multcomp-lm-char.new.svg delete mode 100644 tests/testthat/_snaps/stat-multcomp/stat-multcomp-lm-fun.new.svg delete mode 100644 tests/testthat/_snaps/stat-multcomp/stat-multcomp-noload-more.new.svg delete mode 100644 tests/testthat/_snaps/stat-multcomp/stat-multcomp-noload.new.svg delete mode 100644 tests/testthat/_snaps/stat-multcomp/stat-multcomp-p-digits2.new.svg delete mode 100644 tests/testthat/_snaps/stat-multcomp/stat-multcomp-p-digits6.new.svg delete mode 100644 tests/testthat/_snaps/stat-multcomp/stat-multcomp-rlm-char.new.svg delete mode 100644 tests/testthat/_snaps/stat-multcomp/stat-multcomp-rlm-fun.new.svg delete mode 100644 tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-bottom-num-dunnet.new.svg delete mode 100644 tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-bottom-num-tukey.new.svg delete mode 100644 tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-dunnet.new.svg delete mode 100644 tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-num-dunnet.new.svg delete mode 100644 tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-num-tukey.new.svg delete mode 100644 tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-tukey.new.svg diff --git a/NEWS.md b/NEWS.md index aaebae7..19029a5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -9,6 +9,7 @@ editor_options: - Fix decoding of `orientation` from formula to allow function calls on the rhs of formulas, e.g., `I(y - 10) ~ x` or `I(x - 10) ~ y`. - Move transcriptomics example data objects to package 'ggpp'. +- Fix scrambled table in the vignette (reported by _markbneal_). # ggpmisc 0.5.4 diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bars-dunnet.new.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bars-dunnet.new.svg deleted file mode 100644 index cc211fe..0000000 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bars-dunnet.new.svg +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -P - -< - -0.001 - - -P - -< - -0.001 - - -P - -< - -0.001 - - - -0 -100 -200 - - - - - - - -A -B -C -D -group -y2 -stat_multcomp_bars_dunnet - - diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bars-dunnet.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bars-dunnet.svg index ed8cb1d..cc211fe 100644 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bars-dunnet.svg +++ b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bars-dunnet.svg @@ -44,21 +44,21 @@ - + P < 0.001 - + P < 0.001 - + P < diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bars-tukey.new.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bars-tukey.new.svg deleted file mode 100644 index dca1cef..0000000 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bars-tukey.new.svg +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -P - -= - -0.002 - - -P - -< - -0.001 - - -P - -< - -0.001 - - -P - -= - -0.003 - - -P - -< - -0.001 - - -P - -< - -0.001 - - - -0 -100 -200 -300 - - - - - - - - -A -B -C -D -group -y2 -stat_multcomp_bars_tukey - - diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bars-tukey.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bars-tukey.svg index 9b7944f..dca1cef 100644 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bars-tukey.svg +++ b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bars-tukey.svg @@ -44,42 +44,42 @@ - + P = 0.002 - + P < 0.001 - + P < 0.001 - + P = 0.003 - + P < 0.001 - + P < diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bonferroni-dunnet.new.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bonferroni-dunnet.new.svg deleted file mode 100644 index 53dfcf3..0000000 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bonferroni-dunnet.new.svg +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -P - -< - -0.001 - - -P - -< - -0.001 - - -P - -< - -0.001 - - - -0 -100 -200 - - - - - - - -A -B -C -D -group -y2 -stat_multcomp_bonferroni_dunnet - - diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bonferroni-dunnet.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bonferroni-dunnet.svg index 304dc03..53dfcf3 100644 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bonferroni-dunnet.svg +++ b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bonferroni-dunnet.svg @@ -44,21 +44,21 @@ - + P < 0.001 - + P < 0.001 - + P < diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bonferroni-tukey.new.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bonferroni-tukey.new.svg deleted file mode 100644 index 14ada46..0000000 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bonferroni-tukey.new.svg +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -P - -= - -0.002 - - -P - -< - -0.001 - - -P - -< - -0.001 - - -P - -= - -0.003 - - -P - -< - -0.001 - - -P - -< - -0.001 - - - -0 -100 -200 -300 - - - - - - - - -A -B -C -D -group -y2 -stat_multcomp_bonferroni_tukey - - diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bonferroni-tukey.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bonferroni-tukey.svg index 0130918..14ada46 100644 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bonferroni-tukey.svg +++ b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-bonferroni-tukey.svg @@ -44,42 +44,42 @@ - + P = 0.002 - + P < 0.001 - + P < 0.001 - + P = 0.003 - + P < 0.001 - + P < diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-lm-char.new.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-lm-char.new.svg deleted file mode 100644 index 8076f84..0000000 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-lm-char.new.svg +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -P - -= - -0.002 - - -P - -< - -0.001 - - -P - -< - -0.001 - - -P - -= - -0.003 - - -P - -< - -0.001 - - -P - -< - -0.001 - - - -0 -100 -200 -300 - - - - - - - - -A -B -C -D -group -y2 -stat_multcomp_lm.char - - diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-lm-char.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-lm-char.svg index 4aa5956..8076f84 100644 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-lm-char.svg +++ b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-lm-char.svg @@ -44,42 +44,42 @@ - + P = 0.002 - + P < 0.001 - + P < 0.001 - + P = 0.003 - + P < 0.001 - + P < diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-lm-fun.new.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-lm-fun.new.svg deleted file mode 100644 index 6485dfd..0000000 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-lm-fun.new.svg +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -P - -= - -0.002 - - -P - -< - -0.001 - - -P - -< - -0.001 - - -P - -= - -0.003 - - -P - -< - -0.001 - - -P - -< - -0.001 - - - -0 -100 -200 -300 - - - - - - - - -A -B -C -D -group -y2 -stat_multcomp_lm.fun - - diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-lm-fun.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-lm-fun.svg index 2448d11..6485dfd 100644 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-lm-fun.svg +++ b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-lm-fun.svg @@ -44,42 +44,42 @@ - + P = 0.002 - + P < 0.001 - + P < 0.001 - + P = 0.003 - + P < 0.001 - + P < diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-noload-more.new.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-noload-more.new.svg deleted file mode 100644 index d593d59..0000000 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-noload-more.new.svg +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Δ - -= - -31.1 -, -P - -= - -0.002 - - -Δ - -= - -60.9 -, -P - -< - -0.001 - - -Δ - -= - -94.5 -, -P - -< - -0.001 - - -Δ - -= - -29.8 -, -P - -= - -0.003 - - -Δ - -= - -63.5 -, -P - -< - -0.001 - - -Δ - -= - -33.7 -, -P - -< - -0.001 - - - -100 -200 -300 - - - - - - - -A -B -C -D -group -y2 -stat_multcomp_noload_more - - diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-noload-more.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-noload-more.svg index f49b99e..d593d59 100644 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-noload-more.svg +++ b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-noload-more.svg @@ -36,7 +36,7 @@ - + Δ = @@ -49,7 +49,7 @@ 0.002 - + Δ = @@ -62,7 +62,7 @@ 0.001 - + Δ = @@ -75,7 +75,7 @@ 0.001 - + Δ = @@ -88,7 +88,7 @@ 0.003 - + Δ = @@ -101,7 +101,7 @@ 0.001 - + Δ = diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-noload.new.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-noload.new.svg deleted file mode 100644 index 6f8f109..0000000 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-noload.new.svg +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -P - -= - -0.002 - - -P - -< - -0.001 - - -P - -< - -0.001 - - -P - -= - -0.003 - - -P - -< - -0.001 - - -P - -< - -0.001 - - - -0 -100 -200 -300 - - - - - - - - -A -B -C -D -group -y2 -stat_multcomp_noload - - diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-noload.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-noload.svg index 8bad2e9..6f8f109 100644 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-noload.svg +++ b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-noload.svg @@ -44,42 +44,42 @@ - + P = 0.002 - + P < 0.001 - + P < 0.001 - + P = 0.003 - + P < 0.001 - + P < diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-p-digits2.new.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-p-digits2.new.svg deleted file mode 100644 index c275ce0..0000000 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-p-digits2.new.svg +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -P - -< - -0.01 - - -P - -< - -0.01 - - -P - -< - -0.01 - - -P - -< - -0.01 - - -P - -< - -0.01 - - -P - -< - -0.01 - - - -0 -100 -200 -300 - - - - - - - - -A -B -C -D -group -y2 -stat_multcomp_p.digits2 - - diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-p-digits2.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-p-digits2.svg index ff5719c..c275ce0 100644 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-p-digits2.svg +++ b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-p-digits2.svg @@ -44,42 +44,42 @@ - + P < 0.01 - + P < 0.01 - + P < 0.01 - + P < 0.01 - + P < 0.01 - + P < diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-p-digits6.new.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-p-digits6.new.svg deleted file mode 100644 index 359900e..0000000 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-p-digits6.new.svg +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -P - -= - -0.001827 - - -P - -< - -0.000001 - - -P - -< - -0.000001 - - -P - -= - -0.002996 - - -P - -< - -0.000001 - - -P - -= - -0.000649 - - - -0 -100 -200 -300 - - - - - - - - -A -B -C -D -group -y2 -stat_multcomp_p.digits6 - - diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-p-digits6.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-p-digits6.svg index e5245d0..359900e 100644 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-p-digits6.svg +++ b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-p-digits6.svg @@ -44,42 +44,42 @@ - + P = 0.001827 - + P < 0.000001 - + P < 0.000001 - + P = 0.002996 - + P < 0.000001 - + P = diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-rlm-char.new.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-rlm-char.new.svg deleted file mode 100644 index 00692b8..0000000 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-rlm-char.new.svg +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -P - -= - -0.002 - - -P - -< - -0.001 - - -P - -< - -0.001 - - -P - -= - -0.004 - - -P - -< - -0.001 - - -P - -< - -0.001 - - - -0 -100 -200 -300 - - - - - - - - -A -B -C -D -group -y2 -stat_multcomp_rlm.char - - diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-rlm-char.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-rlm-char.svg index 4767fe4..00692b8 100644 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-rlm-char.svg +++ b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-rlm-char.svg @@ -44,42 +44,42 @@ - + P = 0.002 - + P < 0.001 - + P < 0.001 - + P = 0.004 - + P < 0.001 - + P < diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-rlm-fun.new.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-rlm-fun.new.svg deleted file mode 100644 index db2a9f4..0000000 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-rlm-fun.new.svg +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -P - -= - -0.002 - - -P - -< - -0.001 - - -P - -< - -0.001 - - -P - -= - -0.003 - - -P - -< - -0.001 - - -P - -< - -0.001 - - - -0 -100 -200 -300 - - - - - - - - -A -B -C -D -group -y2 -stat_multcomp_rlm.fun - - diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-rlm-fun.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-rlm-fun.svg index afd7116..db2a9f4 100644 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-rlm-fun.svg +++ b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-rlm-fun.svg @@ -44,42 +44,42 @@ - + P = 0.002 - + P < 0.001 - + P < 0.001 - + P = 0.003 - + P < 0.001 - + P < diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-bottom-num-dunnet.new.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-bottom-num-dunnet.new.svg deleted file mode 100644 index 81182fa..0000000 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-bottom-num-dunnet.new.svg +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -P - -< - -0.001 - - -P - -< - -0.001 - - -P - -< - -0.001 - - - -0 -100 -200 - - - - - - - -A -B -C -D -group -y2 -stat_multcomp_y_bottom_num_dunnet - - diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-bottom-num-dunnet.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-bottom-num-dunnet.svg index c6b19b8..81182fa 100644 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-bottom-num-dunnet.svg +++ b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-bottom-num-dunnet.svg @@ -44,21 +44,21 @@ - + P < 0.001 - + P < 0.001 - + P < diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-bottom-num-tukey.new.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-bottom-num-tukey.new.svg deleted file mode 100644 index b1369e1..0000000 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-bottom-num-tukey.new.svg +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -P - -= - -0.002 - - -P - -< - -0.001 - - -P - -< - -0.001 - - -P - -= - -0.003 - - -P - -< - -0.001 - - -P - -< - -0.001 - - - --100 -0 -100 -200 - - - - - - - - -A -B -C -D -group -y2 -stat_multcomp_y_bottom_num_tukey - - diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-bottom-num-tukey.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-bottom-num-tukey.svg index 16b2d0a..b1369e1 100644 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-bottom-num-tukey.svg +++ b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-bottom-num-tukey.svg @@ -44,42 +44,42 @@ - + P = 0.002 - + P < 0.001 - + P < 0.001 - + P = 0.003 - + P < 0.001 - + P < diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-dunnet.new.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-dunnet.new.svg deleted file mode 100644 index 4787226..0000000 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-dunnet.new.svg +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -P - -< - -0.001 - - -P - -< - -0.001 - - -P - -< - -0.001 - - - -0 -100 -200 - - - - - - - -A -B -C -D -group -y2 -stat_multcomp_y_top_dunnet - - diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-dunnet.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-dunnet.svg index 22b7431..4787226 100644 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-dunnet.svg +++ b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-dunnet.svg @@ -44,21 +44,21 @@ - + P < 0.001 - + P < 0.001 - + P < diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-num-dunnet.new.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-num-dunnet.new.svg deleted file mode 100644 index 3b60bd4..0000000 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-num-dunnet.new.svg +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -P - -< - -0.001 - - -P - -< - -0.001 - - -P - -< - -0.001 - - - -0 -50 -100 -150 -200 - - - - - - - - - -A -B -C -D -group -y2 -stat_multcomp_y_top_num_dunnet - - diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-num-dunnet.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-num-dunnet.svg index 970135b..3b60bd4 100644 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-num-dunnet.svg +++ b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-num-dunnet.svg @@ -44,21 +44,21 @@ - + P < 0.001 - + P < 0.001 - + P < diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-num-tukey.new.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-num-tukey.new.svg deleted file mode 100644 index b179512..0000000 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-num-tukey.new.svg +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -P - -= - -0.002 - - -P - -< - -0.001 - - -P - -< - -0.001 - - -P - -= - -0.003 - - -P - -< - -0.001 - - -P - -< - -0.001 - - - -0 -100 -200 - - - - - - - -A -B -C -D -group -y2 -stat_multcomp_y_top_num_tukey - - diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-num-tukey.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-num-tukey.svg index a759b13..b179512 100644 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-num-tukey.svg +++ b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-num-tukey.svg @@ -44,42 +44,42 @@ - + P = 0.002 - + P < 0.001 - + P < 0.001 - + P = 0.003 - + P < 0.001 - + P < diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-tukey.new.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-tukey.new.svg deleted file mode 100644 index 6ffa01d..0000000 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-tukey.new.svg +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -P - -= - -0.002 - - -P - -< - -0.001 - - -P - -< - -0.001 - - -P - -= - -0.003 - - -P - -< - -0.001 - - -P - -< - -0.001 - - - -0 -100 -200 -300 - - - - - - - - -A -B -C -D -group -y2 -stat_multcomp_y_top_tukey - - diff --git a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-tukey.svg b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-tukey.svg index d2ff43c..6ffa01d 100644 --- a/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-tukey.svg +++ b/tests/testthat/_snaps/stat-multcomp/stat-multcomp-y-top-tukey.svg @@ -44,42 +44,42 @@ - + P = 0.002 - + P < 0.001 - + P < 0.001 - + P = 0.003 - + P < 0.001 - + P < diff --git a/vignettes/model-based-annotations.R b/vignettes/model-based-annotations.R index 2252a83..d79e745 100644 --- a/vignettes/model-based-annotations.R +++ b/vignettes/model-based-annotations.R @@ -1,4 +1,4 @@ -## ---- include=FALSE, echo=FALSE----------------------------------------------- +## ----include=FALSE, echo=FALSE------------------------------------------------ library(knitr) opts_chunk$set(fig.align = 'center', fig.show = 'hold', fig.width = 7, fig.height = 4) @@ -8,7 +8,7 @@ options(warnPartialMatchArgs = FALSE, dplyr.summarise.inform = FALSE) eval_flag <- TRUE # evaluate all code chunks -## ---- message=FALSE----------------------------------------------------------- +## ----message=FALSE------------------------------------------------------------ library(ggpmisc) library(tibble) library(dplyr) @@ -134,7 +134,7 @@ ggplot(my.data, aes(x, y)) + sep = "")), formula = formula, size = 3) -## ---- eval=eval_flag---------------------------------------------------------- +## ----eval=eval_flag----------------------------------------------------------- formula <- y ~ poly(x, 3, raw = TRUE) ggplot(my.data, aes(x, y)) + geom_point() + @@ -142,7 +142,7 @@ ggplot(my.data, aes(x, y)) + stat_poly_eq(mapping = use_label(c("eq", "adj.R2"), sep = "~~italic(\"with\")~~"), formula = formula) -## ---- eval=eval_flag---------------------------------------------------------- +## ----eval=eval_flag----------------------------------------------------------- formula <- y ~ poly(x, 3, raw = TRUE) ggplot(my.data, aes(x, y)) + geom_point() + @@ -150,7 +150,7 @@ ggplot(my.data, aes(x, y)) + stat_poly_eq(aes(label = paste("atop(", after_stat(AIC.label), ",", after_stat(BIC.label), ")", sep = "")), formula = formula) -## ---- eval=eval_flag---------------------------------------------------------- +## ----eval=eval_flag----------------------------------------------------------- formula <- y ~ poly(x, 3, raw = TRUE) ggplot(my.data, aes(x, y)) + geom_point() + @@ -159,7 +159,7 @@ ggplot(my.data, aes(x, y)) + eq.with.lhs = FALSE, formula = formula) -## ---- eval=eval_flag---------------------------------------------------------- +## ----eval=eval_flag----------------------------------------------------------- formula <- y ~ poly(x, 3, raw = TRUE) ggplot(my.data, aes(x, y)) + geom_point() + @@ -179,7 +179,7 @@ ggplot(my.data, aes(x, y)) + formula = formula) + labs(x = expression(italic(z)), y = expression(italic(h))) -## ---- eval=eval_flag---------------------------------------------------------- +## ----eval=eval_flag----------------------------------------------------------- formula <- y ~ poly(x, 2, raw = TRUE) ggplot(my.data, aes(x, log10(y + 1e6))) + geom_point() + @@ -197,7 +197,7 @@ ggplot(my.data, aes(x, y)) + stat_poly_line(formula = formula) + stat_poly_eq(mapping = use_label("eq"), formula = formula) -## ---- eval=eval_flag---------------------------------------------------------- +## ----eval=eval_flag----------------------------------------------------------- formula <- y ~ x + I(x^2) + I(x^3) - 1 ggplot(my.data, aes(x, y)) + geom_point() + @@ -245,7 +245,7 @@ ggplot(my.data, aes(x, y2)) + formula = formula) + facet_wrap(~group) -## ---- eval=eval_flag---------------------------------------------------------- +## ----eval=eval_flag----------------------------------------------------------- formula <- y ~ poly(x, 3, raw = TRUE) ggplot(my.data, aes(x, y2)) + geom_point() + @@ -261,7 +261,7 @@ ggplot(my.data, aes(x, y2, colour = group)) + stat_poly_line(formula = formula) + stat_poly_eq(aes(label = after_stat(eq.label)), formula = formula, vstep = 0.06) -## ---- eval=eval_flag---------------------------------------------------------- +## ----eval=eval_flag----------------------------------------------------------- formula <- y ~ poly(x, 3, raw = TRUE) ggplot(my.data, aes(x, y2, colour = group, grp.label = group)) + geom_point() + @@ -279,7 +279,7 @@ ggplot(my.data, aes(x, y2, linetype = group, grp.label = group)) + eq.label, sep = ""))), formula = formula) -## ---- eval=eval_flag---------------------------------------------------------- +## ----eval=eval_flag----------------------------------------------------------- formula <- y ~ poly(x, 3, raw = TRUE) ggplot(my.data, aes(x, y2, colour = group)) + geom_point() + @@ -298,7 +298,7 @@ ggplot(my.data, aes(x, y2, fill = block)) + formula = formula) + facet_wrap(~group, scales = "free_y") -## ---- eval=eval_flag---------------------------------------------------------- +## ----eval=eval_flag----------------------------------------------------------- formula <- y ~ poly(x, 3, raw = TRUE) ggplot(my.data, aes(x, y2, colour = group, fill = block)) + geom_point(shape = 21, size = 3) + @@ -341,22 +341,22 @@ ggplot(my.data, aes(x, y)) + stat_ma_eq(mapping = use_label(c("R2", "eq")), color = "red", orientation = "y", label.y = 0.9) -## ---- warning=FALSE----------------------------------------------------------- +## ----warning=FALSE------------------------------------------------------------ ggplot(my.data, aes(x, y)) + geom_point() + stat_quant_band(formula = y ~ poly(x, 2)) -## ---- warning=FALSE----------------------------------------------------------- +## ----warning=FALSE------------------------------------------------------------ ggplot(my.data, aes(x, y)) + geom_point() + stat_quant_line(formula = y ~ poly(x, 2), quantiles = c(0.05, 0.95)) -## ---- warning=FALSE----------------------------------------------------------- +## ----warning=FALSE------------------------------------------------------------ ggplot(my.data, aes(x, y)) + geom_point() + stat_quant_line(formula = y ~ poly(x, 2), quantiles = 0.5) -## ---- warning=FALSE----------------------------------------------------------- +## ----warning=FALSE------------------------------------------------------------ ggplot(my.data, aes(x, y)) + geom_point() + stat_quant_band(formula = formula, color = "black", fill = "grey60") + @@ -365,7 +365,7 @@ ggplot(my.data, aes(x, y)) + formula = formula) + theme_classic() -## ---- warning=FALSE----------------------------------------------------------- +## ----warning=FALSE------------------------------------------------------------ ggplot(my.data, aes(x, y, color = group)) + geom_point() + stat_quant_line(formula = formula) + @@ -373,7 +373,7 @@ ggplot(my.data, aes(x, y, color = group)) + after_stat(eq.label), sep = "")), formula = formula) -## ---- warning=FALSE----------------------------------------------------------- +## ----warning=FALSE------------------------------------------------------------ ggplot(my.data, aes(x, y, group = group, linetype = group, shape = group, grp.label = group)) + geom_point() + @@ -383,7 +383,7 @@ ggplot(my.data, aes(x, y, group = group, linetype = group, formula = formula, quantiles = c(0.05, 0.95)) + theme_classic() -## ---- warning=FALSE----------------------------------------------------------- +## ----warning=FALSE------------------------------------------------------------ ggplot(my.data, aes(x, y)) + geom_point() + stat_quant_line(formula = y ~ x, color = "blue", quantiles = 0.05) + @@ -488,7 +488,7 @@ ggplot(my.data, aes(x, y, colour = group)) + mapping = aes(size = sqrt(after_stat(weights))), alpha = 2/3) -## ---- eval = FALSE------------------------------------------------------------ +## ----eval = FALSE------------------------------------------------------------- # formula <- y ~ poly(x, 3, raw = TRUE) # ggplot(my.data, aes(x, y, colour = group)) + # geom_hline(yintercept = 0, linetype = "dashed") + @@ -501,7 +501,7 @@ ggplot(my.data, aes(x, y)) + stat_fit_deviations(formula = formula, colour = "red") + geom_point() -## ---- eval=eval_flag---------------------------------------------------------- +## ----eval=eval_flag----------------------------------------------------------- formula <- y ~ poly(x, 3, raw = TRUE) ggplot(my.data, aes(x, y)) + geom_smooth(method = "lm", formula = formula) + @@ -521,7 +521,7 @@ ggplot(my.data.outlier, aes(x, y)) + scale_color_gradient(low = "red", high = "blue", limits = c(0, 1)) + geom_point() -## ---- eval=eval_broom--------------------------------------------------------- +## ----eval=eval_broom---------------------------------------------------------- # formula <- y ~ poly(x, 3, raw = TRUE) # broom::augment does not handle poly() correctly! formula <- y ~ x + I(x^2) + I(x^3) @@ -536,7 +536,7 @@ ggplot(my.data, aes(x, y, colour = group)) + after_stat(p.value))), parse = TRUE) -## ---- eval=eval_broom--------------------------------------------------------- +## ----eval=eval_broom---------------------------------------------------------- micmen.formula <- y ~ SSmicmen(x, Vm, K) ggplot(Puromycin, aes(conc, rate, colour = state)) + geom_point() + @@ -550,7 +550,7 @@ ggplot(Puromycin, aes(conc, rate, colour = state)) + sep = "")), label.x = "centre", label.y = "bottom") -## ---- eval=eval_broom--------------------------------------------------------- +## ----eval=eval_broom---------------------------------------------------------- formula <- y ~ x + I(x^2) + I(x^3) ggplot(my.data, aes(x, y)) + geom_point() + @@ -565,7 +565,7 @@ ggplot(my.data, aes(x, y)) + label.y = "top", label.x = "left", parse = TRUE) -## ---- eval=eval_broom--------------------------------------------------------- +## ----eval=eval_broom---------------------------------------------------------- formula <- y ~ x + I(x^2) + I(x^3) ggplot(my.data, aes(x, y)) + geom_point() + @@ -581,7 +581,7 @@ ggplot(my.data, aes(x, y)) + label.y = "top", label.x = "left", parse = TRUE) -## ---- eval=eval_broom--------------------------------------------------------- +## ----eval=eval_broom---------------------------------------------------------- formula <- y ~ x + I(x^2) + I(x^3) ggplot(my.data, aes(x, y)) + geom_point() + @@ -591,7 +591,7 @@ ggplot(my.data, aes(x, y)) + tb.type = "fit.coefs", parse = TRUE, label.y = "center", label.x = "left") -## ---- eval=eval_broom--------------------------------------------------------- +## ----eval=eval_broom---------------------------------------------------------- micmen.formula <- y ~ SSmicmen(x, Vm, K) ggplot(Puromycin, aes(conc, rate, colour = state)) + facet_wrap(~state) + @@ -607,7 +607,7 @@ ggplot(Puromycin, aes(conc, rate, colour = state)) + theme(legend.position = "none") + labs(x = "C", y = "V") -## ---- eval=eval_broom--------------------------------------------------------- +## ----eval=eval_broom---------------------------------------------------------- ggplot(chickwts, aes(factor(feed), weight)) + stat_summary(fun.data = "mean_se") + stat_fit_tb(tb.type = "fit.anova", @@ -615,14 +615,14 @@ ggplot(chickwts, aes(factor(feed), weight)) + label.y = "bottom") + expand_limits(y = 0) -## ---- eval=eval_broom--------------------------------------------------------- +## ----eval=eval_broom---------------------------------------------------------- ggplot(chickwts, aes(factor(feed), weight)) + stat_summary(fun.data = "mean_se") + stat_fit_tb(tb.type = "fit.anova", label.x = "left", size = 3) + scale_x_discrete(expand = expansion(mult = c(0.2, 0.5))) + coord_flip() -## ---- eval=(eval_flag && eval_broom)------------------------------------------ +## ----eval=(eval_flag && eval_broom)------------------------------------------- ggplot(chickwts, aes(factor(feed), weight)) + stat_summary(fun.data = "mean_se") + stat_fit_tb(tb.type = "fit.anova", @@ -638,7 +638,7 @@ ggplot(chickwts, aes(factor(feed), weight)) + scale_x_discrete(expand = expansion(mult = c(0.1, 0.35))) + expand_limits(y = 0) -## ---- eval=eval_broom--------------------------------------------------------- +## ----eval=eval_broom---------------------------------------------------------- micmen.formula <- y ~ SSmicmen(x, Vm, K) ggplot(Puromycin, aes(conc, rate, colour = state)) + geom_point() + @@ -656,7 +656,7 @@ ggplot(Puromycin, aes(conc, rate, colour = state)) + sep = "")), parse = TRUE) -## ---- eval=eval_broom--------------------------------------------------------- +## ----eval=eval_broom---------------------------------------------------------- micmen.formula <- y ~ SSmicmen(x, Vm, K) ggplot(Puromycin, aes(conc, rate, colour = state)) + geom_point() + @@ -675,7 +675,7 @@ ggplot(Puromycin, aes(conc, rate, colour = state)) + parse = TRUE) + labs(x = "C", y = "V") -## ---- eval=eval_broom--------------------------------------------------------- +## ----eval=eval_broom---------------------------------------------------------- stat_micmen_eq <- function(vstep = 0.12, size = 3, ...) { @@ -690,7 +690,7 @@ stat_micmen_eq <- function(vstep = 0.12, ...) } -## ---- eval=(eval_flag && eval_broom)------------------------------------------ +## ----eval=(eval_flag && eval_broom)------------------------------------------- micmen.formula <- y ~ SSmicmen(x, Vm, K) ggplot(Puromycin, aes(conc, rate, colour = state)) + geom_point() + @@ -701,7 +701,7 @@ ggplot(Puromycin, aes(conc, rate, colour = state)) + label.y = "bottom") + labs(x = "C", y = "V") -## ---- eval=eval_broom--------------------------------------------------------- +## ----eval=eval_broom---------------------------------------------------------- my_formula <- y ~ x ggplot(mpg, aes(displ, 1 / hwy)) + @@ -716,7 +716,7 @@ ggplot(mpg, aes(displ, 1 / hwy)) + after_stat(x_p.value))), parse = TRUE) -## ---- eval=eval_broom--------------------------------------------------------- +## ----eval=eval_broom---------------------------------------------------------- stat_rq_eqn <- function(formula = y ~ x, tau = 0.5, @@ -736,13 +736,13 @@ stat_rq_eqn <- ...) } -## ---- eval=(eval_flag && eval_broom)------------------------------------------ +## ----eval=(eval_flag && eval_broom)------------------------------------------- ggplot(mpg, aes(displ, 1 / hwy)) + geom_point() + geom_quantile(quantiles = 0.5, formula = my_formula) + stat_rq_eqn(tau = 0.5, formula = my_formula) -## ---- eval=eval_broom--------------------------------------------------------- +## ----eval=eval_broom---------------------------------------------------------- # formula <- y ~ poly(x, 3, raw = TRUE) # broom::augment does not handle poly correctly! formula <- y ~ x + I(x^2) + I(x^3) @@ -751,14 +751,14 @@ ggplot(my.data, aes(x, y)) + stat_fit_augment(method = "lm", method.args = list(formula = formula)) -## ---- eval=eval_broom--------------------------------------------------------- +## ----eval=eval_broom---------------------------------------------------------- formula <- y ~ x + I(x^2) + I(x^3) ggplot(my.data, aes(x, y, colour = group)) + geom_point() + stat_fit_augment(method = "lm", method.args = list(formula = formula)) -## ---- eval=(eval_flag && eval_broom)------------------------------------------ +## ----eval=(eval_flag && eval_broom)------------------------------------------- formula <- y ~ x + I(x^2) + I(x^3) ggplot(my.data, aes(x, y)) + stat_fit_augment(method = "lm", @@ -766,7 +766,7 @@ ggplot(my.data, aes(x, y)) + geom = "point", y.out = ".resid") -## ---- eval=eval_broom--------------------------------------------------------- +## ----eval=eval_broom---------------------------------------------------------- formula <- y ~ x + I(x^2) + I(x^3) ggplot(my.data, aes(x, y, colour = group)) + stat_fit_augment(method = "lm", @@ -774,7 +774,7 @@ ggplot(my.data, aes(x, y, colour = group)) + geom = "point", y.out = ".std.resid") -## ---- eval=(eval_flag && eval_broom)------------------------------------------ +## ----eval=(eval_flag && eval_broom)------------------------------------------- args <- list(formula = y ~ k * e ^ x, start = list(k = 1, e = 2)) ggplot(mtcars, aes(wt, mpg)) + @@ -782,7 +782,7 @@ ggplot(mtcars, aes(wt, mpg)) + stat_fit_augment(method = "nls", method.args = args) -## ---- eval=(eval_flag && eval_broom)------------------------------------------ +## ----eval=(eval_flag && eval_broom)------------------------------------------- args <- list(formula = y ~ k * e ^ x, start = list(k = 1, e = 2)) ggplot(mtcars, aes(wt, mpg)) + @@ -791,7 +791,7 @@ ggplot(mtcars, aes(wt, mpg)) + geom = "point", y.out = ".resid") -## ---- eval=(eval_nlme && eval_broom_mixed)------------------------------------ +## ----eval=(eval_nlme && eval_broom_mixed)------------------------------------- args <- list(model = y ~ SSlogis(x, Asym, xmid, scal), fixed = Asym + xmid + scal ~1, random = Asym ~1 | group, @@ -802,7 +802,7 @@ ggplot(Orange, aes(age, circumference, colour = Tree)) + method.args = args, augment.args = list(data = quote(data))) -## ---- eval=(eval_broom && eval_gginnards)------------------------------------- +## ----eval=(eval_broom && eval_gginnards)-------------------------------------- # formula <- y ~ poly(x, 3, raw = TRUE) # broom::augment does not handle poly() correctly! formula <- y ~ x + I(x^2) + I(x^3) @@ -818,7 +818,7 @@ ggplot(my.data, aes(x, y, colour = group)) + after_stat(p.value))), parse = TRUE) -## ---- eval=(eval_broom && eval_gginnards)------------------------------------- +## ----eval=(eval_broom && eval_gginnards)-------------------------------------- formula <- y ~ x + I(x^2) + I(x^3) ggplot(my.data, aes(x, y)) + geom_point() + diff --git a/vignettes/model-based-annotations.html b/vignettes/model-based-annotations.html index 7ccd0f9..b1a44fe 100644 --- a/vignettes/model-based-annotations.html +++ b/vignettes/model-based-annotations.html @@ -12,7 +12,7 @@ - + Fitted-Model-Based Annotations @@ -339,9 +339,9 @@

Fitted-Model-Based Annotations

-

‘ggpmisc’ 0.5.4.1

+

‘ggpmisc’ 0.5.4.1.9001

Pedro J. Aphalo

-

2023-08-13

+

2023-11-05

@@ -564,91 +564,94 @@

Statistics

-Statistic -Returned values (default geometry) -Methods +Statistic +Returned values
(default geometry) +Methods -stat_poly_eq() -equation, R2, P, etc. +stat_poly_eq() +equation, R2, P, etc. (text_npc) -lm, rlm (1, 2, 7) +lm, rlm (1, 2, 7) -stat_ma_eq() -equation, R2, P, etc. +stat_ma_eq() +equation, R2, P, etc. (text_npc) -lmodel2 (6, 7) +lmodel2 (6, 7) -stat_quant_eq() -equation, P, etc. (text_npc) -rq (1, 3, 4, 7) +stat_quant_eq() +equation, P, etc. (text_npc) +rq (1, 3, 4, 7) -stat_correlation() -correlation, P-value, CI (text_npc) -Pearson (t), Kendall (z), Spearman +stat_correlation() +correlation, P-value, CI +(text_npc) +Pearson (t), Kendall (z), Spearman (S) -stat_poly_line() -line + conf. (smooth) -lm, rlm (1, 2, 7) +stat_poly_line() +line + conf. (smooth) +lm, rlm (1, 2, 7) -stat_ma_line() -line + conf. (smooth) -lmodel2 (6, 7) +stat_ma_line() +line + conf. (smooth) +lmodel2 (6, 7) -stat_quant_line() -line + conf. (smooth) -rq, rqss (1, 3, 4, 7) +stat_quant_line() +line + conf. (smooth) +rq, rqss (1, 3, 4, 7) -stat_quant_band() -median + quartiles (smooth) -rq, rqss (1, 4, 5, 7) +stat_quant_band() +median + quartiles (smooth) +rq, rqss (1, 4, 5, 7) -stat_fit_residuals() -residuals (point) -lm, rlm, rq (1, 2, 4, 7, 8) +stat_fit_residuals() +residuals (point) +lm, rlm, rq (1, 2, 4, 7, 8) -stat_fit_deviations() -deviations from observations (segment) -lm, rlm, lqs, rq (1, 2, 4, 7, 9) +stat_fit_deviations() +deviations from observations +(segment) +lm, rlm, lqs, rq (1, 2, 4, 7, 9) -stat_fit_glance() -equation, R2, P, etc. +stat_fit_glance() +equation, R2, P, etc. (text_npc) -those supported by ‘broom’ +those supported by ‘broom’ -stat_fit_augment() -predicted and other values (smooth) -those supported by ‘broom’ +stat_fit_augment() +predicted and other values (smooth) +those supported by ‘broom’ -stat_fit_tidy() -fit results, e.g., for equation (text_npc) -those supported by ‘broom’ +stat_fit_tidy() +fit results, e.g., for equation +(text_npc) +those supported by ‘broom’ -stat_fit_tb() -ANOVA and summary tables (table_npc) -those supported by ‘broom’ +stat_fit_tb() +ANOVA and summary tables (table_npc) +those supported by ‘broom’ -stat_multcomp() -Multiple comparisons (label_pairwise, +stat_multcomp() +Multiple comparisons (label_pairwise, table_npc) -those supported by glht +those supported by glht @@ -692,12 +695,13 @@

Model equations and other annotations

the usual abbreviations or symbols used in statistics as selection key.


-

: Table 2. Values returned by stat_poly_eq(), -stat_ma_eq(), stat_quant_eq(), -stat_correlation() and stat_multcomp() for -output.type different from numeric. -Column variable gives the variable name in the returned -data and should be used together with + + ++++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 2. Values returned by +stat_poly_eq(), stat_ma_eq(), +stat_quant_eq(), stat_correlation() and +stat_multcomp() for output.type different from +numeric.** Column variable gives the variable name +in the returned data and should be used together with after_stat() when mapping to aesthetics using aes(). When using function use_label(), the short abbreviation shown in column Key can be used as a @@ -709,46 +713,502 @@

Model equations and other annotations

x and y or npcx and npcy are set to NA. (3) Depends on label.type. * Indicates the default -mapping to label aesthetic.

-
Variable | Key | Mode | poly_eq | -ma_eq | quant_eq | correlation | -multcomp |
-

|——————-|:——:|:———:|:———:|:——-:|:——— :|:————-:|:———-:| | eq.label | -eq | character | y | y | y* | n | n | | rr.label | R2 | character | y* | -y* | n | y(1) | n | | rr.confint.label | R2.CI | character | y | n | n | -n | n | | adj.rr.label | adj.R2 | character | y | n | n | n | n | | -cor.label | cor | character | n | n | n | y(1) | n | | rho.label | rho | -character | n | n | y | y(1) | n | | tau.label | tau | character | n | n -| n | y(1) | n | | r.label | R | character | n | n | n | y* | n | | -cor.confint.label | cor.CI | character | n | n | n | y(1) | n | | -rho.confint.label | rho.CI | character | n | n | y | y(1) | n | | -tau.confint.label | tau.CI | character | n | n | n | y(1) | n | | -r.confint.label | R.CI | character | n | n | n | y | n | | f.value.label -| F | character | y | n | n | n | n | | t.value.label | t | character | -n | n | n | y(1) | y | | z.value.label | z | character | n | n | n | -y(1) | n | | S.value.label | S | character | n | n | n | y(1) | n | | -p.value.label | P | character | y | y | n | y | y | | delta.label | -delta | character | n | n | n | n | y (3) | | letters.label | delta | -character | n | n | n | n | y (3) | | AIC.label | AIC | character | y | -n | y | n | n | | BIC.label | BIC | character | y | n | n | n | n | | -n.label | n | character | y | y | y | y | y | | grp.label | grp | -character | y | y | y | y | y | | method.label | method | character | y -| y | y | y | n | | r.squared | | numeric | y | y | n | n | n | | -adj.r.squared | | numeric | y | n | n | n | n | | rho | | numeric | n | -n | y | y(1) | n | | tau | | numeric | n | n | n | y(1) | n | | cor | | -numeric | n | n | n | y(1) | n | | p.value | | numeric | y | y | n | y | -y | | n | | numeric | y | y | y | y | y | | rq.method | | character | n -| n | y | n | n | | method | | character | y | y | y | y | n | | test | -| character | n | n | n | y | n | | quantile | | numeric | n | n | y | n -| n | | quantile.f | | factor | n | n | y | n | n | | fm.method | | -character | y | y | y | y | y | | fm.class | | character | y | y | y | y -| y | | fm.formula.chr | | character | y | y | y | y | y | | mc.adjusted -| | character | n | n | n | n | y | | mc.contrast | | character | n | n -| n | n | y | | x.left.tip | | numeric | n | n | n | n | y (3) | | -x.right.tip | | numeric | n | n | n | n | y (3) | | x(2) | | numeric | y -| y | y | y | y | | y(2) | | numeric | y | y | y | y | y | | npcx(2) | | -numeric | y | y | y | y | n | | npcy(2) | | numeric | y | y | y | y | n -|

+mapping to label aesthetic.
VariableKeyModepoly_eqma_eqquant_eqcorrelationmultcomp
eq.labeleqcharacteryyy*nn
rr.labelR2charactery*y*ny(1)n
rr.confint.labelR2.CIcharacterynnnn
adj.rr.labeladj.R2characterynnnn
cor.labelcorcharacternnny(1)n
rho.labelrhocharacternnyy(1)n
tau.labeltaucharacternnny(1)n
r.labelRcharacternnny*n
cor.confint.labelcor.CIcharacternnny(1)n
rho.confint.labelrho.CIcharacternnyy(1)n
tau.confint.labeltau.CIcharacternnny(1)n
r.confint.labelR.CIcharacternnnyn
f.value.labelFcharacterynnnn
t.value.labeltcharacternnny(1)y
z.value.labelzcharacternnny(1)n
S.value.labelScharacternnny(1)n
p.value.labelPcharacteryynyy
delta.labeldeltacharacternnnny (3)
letters.labeldeltacharacternnnny (3)
AIC.labelAICcharacterynynn
BIC.labelBICcharacterynnnn
n.labelncharacteryyyyy
grp.labelgrpcharacteryyyyy
method.labelmethodcharacteryyyyn
r.squarednumericyynnn
adj.r.squarednumericynnnn
rhonumericnnyy(1)n
taunumericnnny(1)n
cornumericnnny(1)n
p.valuenumericyynyy
nnumericyyyyy
rq.methodcharacternnynn
methodcharacteryyyyn
testcharacternnnyn
quantilenumericnnynn
quantile.ffactornnynn
fm.methodcharacteryyyyy
fm.classcharacteryyyyy
fm.formula.chrcharacteryyyyy
mc.adjustedcharacternnnny
mc.contrastcharacternnnny
x.left.tipnumericnnnny (3)
x.right.tipnumericnnnny (3)
x(2)numericyyyyy
y(2)numericyyyyy
npcx(2)numericyyyyn
npcy(2)numericyyyyn

Even though the number of significant digits and some other formatting can be adjusted by passing arguments when calling the statistics function, in some cases it maybe necessary for the user to do @@ -776,8 +1236,8 @@

Model equations and other annotations

-Variable -Mode +Variable +Mode poly_eq ma_eq quant_eq @@ -786,120 +1246,120 @@

Model equations and other annotations

-coef.ls -list +coef.ls +list y y y n -f.value -numeric +f.value +numeric y n n n -f.df1 -numeric +f.df1 +numeric y n n n -f.df2 -numeric +f.df2 +numeric y n n n -t.value -numeric +t.value +numeric n n n y(1) -df -numeric +df +numeric n n n y(1) -z.value -numeric +z.value +numeric n n n y(1) -S.value -numeric +S.value +numeric n n n y(1) -p.value -numeric +p.value +numeric y y n y -AIC -numeric +AIC +numeric y y y n -BIC -numeric +BIC +numeric y y n n -b_0.constant -numeric +b_0.constant +numeric y y y n -b_0 -numeric +b_0 +numeric y y y n -b_1 -numeric +b_1 +numeric y y y n -b_2…b_n -numeric +b_2…b_n +numeric y y y @@ -941,8 +1401,8 @@

Model equations and other annotations

-Variable -Mode +Variable +Mode fit_tb fit_tidy fit_glance @@ -951,80 +1411,80 @@

Model equations and other annotations

-broom method - +broom method + tidy() tidy() glance() augment() -x(1) -numeric +x(1) +numeric y y y y -y(1) -numeric +y(1) +numeric y y y y -npcx(1) -numeric +npcx(1) +numeric y y y n -npcy(1) -numeric +npcy(1) +numeric y y y n -fm.tb -data.frame +fm.tb +data.frame y n n n -fm.tb.type -character +fm.tb.type +character y n n n -fm.method -character +fm.method +character y y y y -fm.class -character +fm.class +character y y y y -fm.formula.chr -character +fm.formula.chr +character y y y @@ -1193,8 +1653,9 @@

stat_correlation()

ggplot(my.data, aes(x, y, color = group)) +
   geom_point() +
   stat_correlation(method = "spearman")
-
## Skipping bootstrap estimation as 'conf.level' <= 0
-## Skipping bootstrap estimation as 'conf.level' <= 0
+
## Warning in compute_group(...): Skipping bootstrap estimation as 'boot.R' < 50
+
+## Warning in compute_group(...): Skipping bootstrap estimation as 'boot.R' < 50

Statistic stat_correlation() generates multiple labels as listed in the tables above. We can combine them freely within a call @@ -2559,13 +3020,13 @@

Quadrant-plot examples

using the two matched scales scale_colour_outcome() and scale_fill_outcome().

head(quadrant_example.df)
-
##         tag          gene outcome.x outcome.y    logFC.x     logFC.y genotype
-## 1 AT5G12290         AtMC9         0         0 -0.3226849  0.32887081      Ler
-## 2 AT5G47040        ATFRO2         0         0 -0.1067945 -0.18828653      Ler
-## 3 AT5G57560 14-3-3EPSILON         0         0  0.2232457  0.74447768      Ler
-## 4 AT5G24110       ATPTEN1         0         0 -0.7253487  0.06952586      Ler
-## 5 AT2G41290         RHF2A         0         0  0.4435049 -0.32347741      Ler
-## 6 AT4G36650          GAE5         0         0 -0.1410215  0.18697968      Ler
+
##         tag     gene outcome.x outcome.y     logFC.x     logFC.y genotype
+## 1 AT5G11060    TIC56         0         0 -0.17685517 -0.32956762      Ler
+## 2 AT3G01280 ATWRKY48         0         0 -0.06471884  0.07771315      Ler
+## 3 AT5G06320     ANY1         0         0 -0.35200684 -0.04331339      Ler
+## 4 AT1G05850    AP1M1         0         0 -0.40284744 -0.04505435      Ler
+## 5 AT2G22300    HSA32         0         0 -0.34482142 -0.11185095      Ler
+## 6 AT2G16070    UBQ11         0         0 -0.22328946 -0.23210780      Ler

In this plot we do not include those genes whose change in transcript abundance is uncertain under both x and y conditions.

  ggplot(subset(quadrant_example.df, 
@@ -2581,7 +3042,7 @@ 

Quadrant-plot examples

scale_colour_outcome() + scale_fill_outcome() + theme_dark()
-

+

To plot in separate panels those observations that are significant along both x and y axes, x axis, y axis, or none, with quadrants merged takes more effort. We first define @@ -2628,7 +3089,7 @@

Quadrant-plot examples

scale_fill_outcome() + facet_wrap(~outcome.xy.fct) + theme_dark()
-

+