From d13006e15beed0d2b0cb9ea99d79fa8b5a727dfe Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Tue, 11 Oct 2022 14:23:30 -0400 Subject: [PATCH] Use `{vdiffr}`; Update GHA; Update "print on CI / examples" method; Fix lints (#453) --- .Rbuildignore | 1 + .github/workflows-ignore/R-CMD-check.yaml | 91 - .github/workflows-ignore/deploy.yaml | 65 - .github/workflows/R-CMD-check.yaml | 55 +- .github/workflows/pkgdown.yaml | 35 - .github/workflows/test-coverage.yaml | 30 - .lintr | 8 +- DESCRIPTION | 3 +- R/deprecated.R | 10 +- R/find-combo.R | 2 +- R/geom_stripped_rows.R | 1 - R/gg-plots.R | 70 +- R/ggbivariate.R | 4 +- R/ggcoef.R | 2 +- R/ggcoef_model.R | 60 +- R/ggcorr.R | 4 +- R/ggfacet.R | 10 +- R/gglyph.R | 17 +- R/ggmatrix_gtable.R | 2 +- R/ggmatrix_gtable_helpers.R | 2 +- R/ggmatrix_legend.R | 2 +- R/ggmatrix_make_plot.R | 2 +- R/ggmatrix_print.R | 6 +- R/ggmatrix_progress.R | 2 +- R/ggnet.R | 30 +- R/ggnet2.R | 50 +- R/ggnetworkmap.R | 36 +- R/ggnostic.R | 8 +- R/ggpairs.R | 50 +- R/ggpairs_add.R | 8 +- R/ggpairs_getput.R | 20 +- R/ggparcoord.R | 41 +- R/ggscatmat.R | 62 +- R/ggsurv.R | 48 +- R/stat_cross.R | 18 +- R/stat_prop.R | 6 +- R/utils.R | 7 +- README.md | 2 +- man/add_and_overwrite_aes.Rd | 2 +- man/ggally_diagAxis.Rd | 4 +- man/ggally_dot.Rd | 2 +- man/ggduo.Rd | 4 +- man/ggfacet.Rd | 2 +- man/gglegend.Rd | 2 +- man/ggmatrix_gtable.Rd | 2 +- man/ggmatrix_location.Rd | 6 +- man/ggmatrix_progress.Rd | 2 +- man/ggnet.Rd | 6 +- man/ggnet2.Rd | 4 +- man/ggnetworkmap.Rd | 4 +- man/ggnostic.Rd | 2 +- man/ggpairs.Rd | 14 +- man/ggparcoord.Rd | 4 +- man/ggsurv.Rd | 6 +- man/glyphs.Rd | 2 +- man/lowertriangle.Rd | 4 +- man/print.ggmatrix.Rd | 2 +- man/putPlot.Rd | 12 +- man/scatmat.Rd | 4 +- man/uppertriangle.Rd | 4 +- notes/color.R | 2 +- notes/correlation-custom.R | 66 +- notes/correlation.R | 18 +- codecov.yml => notes/old-codecov.yml | 0 notes/strip-top.R | 5 +- scripts/revdepcheck.R | 4 +- tests/spelling.R | 2 +- tests/testthat.R | 2 +- tests/testthat/_snaps/gg-plots/cor-green.svg | 54 + .../gg-plots/rescale-false-binwidth.svg | 92 + .../_snaps/gg-plots/rescale-false.svg | 63 + .../_snaps/gg-plots/rescale-true-binwidth.svg | 90 + .../testthat/_snaps/gg-plots/rescale-true.svg | 57 + .../testthat/_snaps/gg-plots/shrink-false.svg | 211 + .../testthat/_snaps/gg-plots/shrink-true.svg | 209 + .../_snaps/gg-plots/smooth-se-false.svg | 206 + .../_snaps/gg-plots/smooth-se-true.svg | 209 + .../_snaps/gg-plots/titanic-count-class.svg | 76 + .../gg-plots/titanic-count-diag-class.svg | 76 + .../titanic-count-diag-interaction.svg | 92 + .../_snaps/gg-plots/titanic-count-diag.svg | 70 + .../gg-plots/titanic-count-interaction.svg | 100 + .../_snaps/gg-plots/titanic-count-red.svg | 62 + .../_snaps/gg-plots/titanic-count-sex.svg | 78 + .../_snaps/gg-plots/titanic-count-toupper.svg | 76 + .../_snaps/gg-plots/titanic-count.svg | 62 + .../_snaps/ggbivariate/tips-fill-qual.svg | 209 + .../_snaps/ggbivariate/tips-legend-3.svg | 325 ++ .../ggbivariate/tips-legend-default.svg | 325 ++ .../_snaps/ggbivariate/tips-numeric.svg | 846 ++++ .../_snaps/ggbivariate/tips-rowbar.svg | 209 + .../_snaps/ggbivariate/tips-title.svg | 210 + tests/testthat/_snaps/ggbivariate/tips.svg | 209 + .../ggbivariate/titanic-weight-freq.svg | 148 + tests/testthat/_snaps/ggcoef/lm-expo-blue.svg | 74 + tests/testthat/_snaps/ggcoef/lm-expo.svg | 80 + tests/testthat/_snaps/ggcoef/lm.svg | 68 + .../_snaps/ggcoef_model/contrasts.svg | 162 + .../_snaps/ggcoef_model/glm-expo-include.svg | 118 + .../ggcoef_model/glm-expo-intercept.svg | 214 + .../glm-expo-no-color-rowstrips.svg | 174 + .../_snaps/ggcoef_model/glm-expo-no-ref.svg | 177 + .../ggcoef_model/glm-expo-significance.svg | 176 + .../testthat/_snaps/ggcoef_model/glm-expo.svg | 183 + .../_snaps/ggcoef_model/lm-color-nofacet.svg | 105 + .../_snaps/ggcoef_model/lm-labelled.svg | 154 + .../_snaps/ggcoef_model/lm-noguide.svg | 147 + .../ggcoef_model/lm-variable-labels-facet.svg | 157 + .../ggcoef_model/lm-variable-labels.svg | 154 + tests/testthat/_snaps/ggcoef_model/lm.svg | 154 + .../_snaps/ggcoef_model/models-faceted.svg | 504 ++ tests/testthat/_snaps/ggcoef_model/models.svg | 270 + .../_snaps/ggcoef_model/multinom-expo.svg | 191 + .../ggcoef_model/multinom-faceted-ylabel.svg | 260 + .../_snaps/ggcoef_model/multinom-faceted.svg | 259 + tests/testthat/_snaps/ggcoef_model/poly.svg | 131 + .../_snaps/ggcorr/flea-big-limits.svg | 80 + tests/testthat/_snaps/ggcorr/flea-limits.svg | 80 + .../testthat/_snaps/ggcorr/flea-no-limits.svg | 83 + .../_snaps/ggcorr/flea-null-limits.svg | 83 + .../_snaps/ggcorr/flea-small-limits.svg | 80 + tests/testthat/_snaps/ggcorr/flea.svg | 80 + tests/testthat/_snaps/ggcorr/geom-blank.svg | 48 + .../_snaps/ggcorr/geom-circle-no-limits.svg | 98 + tests/testthat/_snaps/ggcorr/geom-circle.svg | 95 + .../_snaps/ggcorr/geom-tile-no-limits.svg | 83 + tests/testthat/_snaps/ggcorr/geom-tile.svg | 70 + tests/testthat/_snaps/ggcorr/layout-exp.svg | 80 + .../_snaps/ggcorr/method-everything.svg | 80 + tests/testthat/_snaps/ggfacet/factor.svg | 1208 +++++ tests/testthat/_snaps/ggfacet/pigs.svg | 512 ++ tests/testthat/_snaps/gglegend/custom.svg | 33 + .../_snaps/gglegend/internal-legend.svg | 374 ++ tests/testthat/_snaps/gglegend/legend-pm.svg | 374 ++ tests/testthat/_snaps/gglegend/legend.svg | 218 + .../_snaps/gglegend/plotnew-default.svg | 33 + tests/testthat/_snaps/gglegend/points.svg | 33 + tests/testthat/_snaps/gglegend/pos-bottom.svg | 39 + tests/testthat/_snaps/gglegend/pos-left.svg | 39 + tests/testthat/_snaps/gglegend/pos-right.svg | 39 + tests/testthat/_snaps/gglegend/pos-top.svg | 39 + .../_snaps/ggmatrix/blank-1-2-2-1.svg | 155 + tests/testthat/_snaps/ggmatrix/blank-1-2.svg | 436 ++ .../_snaps/ggmatrix/expression-labels.svg | 450 ++ .../_snaps/ggmatrix/not-enough-plots.svg | 188 + .../testthat/_snaps/ggmatrix/proportions.svg | 352 ++ tests/testthat/_snaps/ggnostic/custom-y.svg | 1476 ++++++ tests/testthat/_snaps/ggnostic/legend.svg | 797 +++ .../testthat/_snaps/ggscatmat/flea-color.svg | 644 +++ .../_snaps/ggscatmat/flea-pearson.svg | 300 ++ .../_snaps/ggscatmat/flea-rsquare.svg | 300 ++ tests/testthat/_snaps/ggscatmat/flea.svg | 300 ++ .../_snaps/ggsurv/plot-cens-true-blue.svg | 102 + .../ggsurv/plot-cens-true-custom-shape.svg | 96 + .../_snaps/ggsurv/plot-cens-true-custom.svg | 102 + .../testthat/_snaps/ggsurv/plot-cens-true.svg | 102 + tests/testthat/_snaps/ggtable/lm.svg | 68 + tests/testthat/_snaps/ggtable/tips-cells.svg | 153 + .../_snaps/ggtable/tips-continuous.svg | 254 + .../_snaps/ggtable/tips-fill-resid.svg | 171 + .../_snaps/ggtable/tips-fill-std-resid.svg | 164 + tests/testthat/_snaps/ggtable/tips.svg | 153 + .../_snaps/ggtable/titanic-weight-freq.svg | 153 + tests/testthat/_snaps/stat_cross/ex.svg | 74 + tests/testthat/_snaps/stat_cross/label.svg | 57 + tests/testthat/_snaps/stat_cross/row-prop.svg | 127 + tests/testthat/_snaps/stat_cross/shape-22.svg | 87 + .../_snaps/stat_cross/table-color-fill.svg | 53 + .../_snaps/stat_cross/table-fill-steps2.svg | 78 + .../_snaps/stat_cross/table-label.svg | 65 + .../_snaps/stat_cross/tips-color-equal.svg | 53 + .../_snaps/stat_cross/tips-diagonal.svg | 49 + .../_snaps/stat_cross/tips-fill-red.svg | 60 + .../_snaps/stat_cross/tips-label-custom.svg | 53 + .../testthat/_snaps/stat_cross/tips-label.svg | 72 + .../_snaps/stat_cross/tips-red-size16.svg | 53 + tests/testthat/_snaps/stat_cross/tips-sex.svg | 60 + .../testthat/_snaps/stat_cross/tips-shape.svg | 60 + .../_snaps/stat_cross/tips-time-color.svg | 61 + .../testthat/_snaps/stat_cross/tips-time.svg | 69 + .../_snaps/stat_cross/titanic-fill-steps2.svg | 87 + .../_snaps/stat_prop/ggduo-titanic.svg | 198 + .../_snaps/stat_prop/tips-bar-width.svg | 66 + .../_snaps/stat_prop/tips-color-white.svg | 66 + .../_snaps/stat_prop/tips-label-custom.svg | 66 + .../testthat/_snaps/stat_prop/tips-label.svg | 66 + .../testthat/_snaps/stat_prop/tips-size8.svg | 66 + tests/testthat/_snaps/stat_prop/tips.svg | 66 + .../_snaps/stat_prop/titanic-dodge.svg | 77 + .../_snaps/stat_prop/titanic-facet.svg | 136 + .../_snaps/stat_prop/titanic-stack.svg | 77 + .../_snaps/stat_prop/titanic-stat-prop.svg | 79 + tests/testthat/_snaps/stat_prop/titanic.svg | 79 + .../geom-bar-dodge-percent.svg | 71 + .../stat_weighted_mean/geom-bar-dodge.svg | 71 + .../stat_weighted_mean/geom-default.svg | 59 + .../stat_weighted_mean/geom-line-grouped.svg | 65 + .../_snaps/stat_weighted_mean/geom-line.svg | 56 + .../_snaps/stat_weighted_mean/point.svg | 299 ++ .../_snaps/stat_weighted_mean/titanic.svg | 71 + .../trends-binary-color.svg | 62 + .../stat_weighted_mean/trends-binary.svg | 51 + .../stat_weighted_mean/trends-color.svg | 63 + .../trends-incl-zero-false.svg | 56 + .../trends-incl-zero-true.svg | 55 + .../stat_weighted_mean/trends-many-color.svg | 80 + .../_snaps/stat_weighted_mean/trends-many.svg | 66 + .../stat_weighted_mean/trends-size-3.svg | 62 + .../stat_weighted_mean/trends-titanic.svg | 64 + .../_snaps/stat_weighted_mean/trends.svg | 56 + .../zzz_ggpairs/axislabels-ggduo-none.svg | 486 ++ .../zzz_ggpairs/axislabels-ggduo-show.svg | 572 +++ .../axislabels-ggpairs-internal.svg | 1105 +++++ .../zzz_ggpairs/axislabels-ggpairs-none.svg | 1134 +++++ .../zzz_ggpairs/axislabels-ggpairs-show.svg | 1240 +++++ ...-autopoint-autopointdiag-autopointdiag.svg | 3343 +++++++++++++ ...ank-denstrip-table-blankdiag-blankdiag.svg | 774 +++ ...ensitystrip-rowbar-blankdiag-blankdiag.svg | 683 +++ ...-autopoint-autopointdiag-autopointdiag.svg | 3357 +++++++++++++ ...ank-denstrip-table-blankdiag-blankdiag.svg | 789 +++ ...ensitystrip-rowbar-blankdiag-blankdiag.svg | 733 +++ ...facetdensity-ratio-blankdiag-blankdiag.svg | 758 +++ ...density-box-colbar-densitydiag-bardiag.svg | 1026 ++++ ...lor-points-dot-count-bardiag-countdiag.svg | 3083 ++++++++++++ ...box-no-facet-cross-blankdiag-tablediag.svg | 1752 +++++++ ...o-facet-crosstable-blankdiag-blankdiag.svg | 2947 +++++++++++ ...facethist-facetbar-blankdiag-blankdiag.svg | 3329 +++++++++++++ ...facetdensity-ratio-blankdiag-blankdiag.svg | 696 +++ ...density-box-colbar-densitydiag-bardiag.svg | 794 +++ ...duo-points-dot-count-bardiag-countdiag.svg | 3051 ++++++++++++ ...box-no-facet-cross-blankdiag-tablediag.svg | 1516 ++++++ ...o-facet-crosstable-blankdiag-blankdiag.svg | 2885 +++++++++++ ...facethist-facetbar-blankdiag-blankdiag.svg | 2187 ++++++++ ...-autopoint-autopointdiag-autopointdiag.svg | 4404 ++++++++++++++++ ...ank-denstrip-table-blankdiag-blankdiag.svg | 1014 ++++ ...ensitystrip-rowbar-blankdiag-blankdiag.svg | 872 ++++ ...-autopoint-autopointdiag-autopointdiag.svg | 4418 +++++++++++++++++ ...ank-denstrip-table-blankdiag-blankdiag.svg | 1029 ++++ ...ensitystrip-rowbar-blankdiag-blankdiag.svg | 934 ++++ ...facetdensity-ratio-blankdiag-blankdiag.svg | 933 ++++ ...density-box-colbar-densitydiag-bardiag.svg | 1261 +++++ ...lor-points-dot-count-bardiag-countdiag.svg | 3507 +++++++++++++ ...box-no-facet-cross-blankdiag-tablediag.svg | 1372 +++++ ...o-facet-crosstable-blankdiag-blankdiag.svg | 2938 +++++++++++ ...facethist-facetbar-blankdiag-blankdiag.svg | 3414 +++++++++++++ ...facetdensity-ratio-blankdiag-blankdiag.svg | 865 ++++ ...density-box-colbar-densitydiag-bardiag.svg | 974 ++++ ...irs-points-dot-count-bardiag-countdiag.svg | 3280 ++++++++++++ ...box-no-facet-cross-blankdiag-tablediag.svg | 1100 ++++ ...o-facet-crosstable-blankdiag-blankdiag.svg | 2900 +++++++++++ ...facethist-facetbar-blankdiag-blankdiag.svg | 1936 ++++++++ .../zzz_ggpairs/nested-strips-default.svg | 1145 +++++ .../_snaps/zzz_ggpairs/nested-strips-true.svg | 1299 +++++ .../_snaps/zzz_ggpairs/show-strips.svg | 762 +++ tests/testthat/test-gg-plots.R | 52 +- tests/testthat/test-ggbivariate.R | 35 +- tests/testthat/test-ggcoef.R | 14 +- tests/testthat/test-ggcoef_model.R | 79 +- tests/testthat/test-ggcorr.R | 33 +- tests/testthat/test-ggfacet.R | 75 +- tests/testthat/test-gglegend.R | 59 +- tests/testthat/test-gglyph.R | 8 +- tests/testthat/test-ggmatrix.R | 17 +- tests/testthat/test-ggmatrix_location.R | 15 +- tests/testthat/test-ggnet.R | 10 +- tests/testthat/test-ggnet2.R | 4 +- tests/testthat/test-ggnetworkmap.R | 4 +- tests/testthat/test-ggnostic.R | 17 +- tests/testthat/test-ggparcoord.R | 2 +- tests/testthat/test-ggscatmat.R | 13 +- tests/testthat/test-ggsurv.R | 60 +- tests/testthat/test-ggtable.R | 43 +- tests/testthat/test-stat_cross.R | 147 +- tests/testthat/test-stat_prop.R | 32 +- tests/testthat/test-stat_weighted_mean.R | 90 +- tests/testthat/test-zzz_ggpairs.R | 111 +- vignettes/ggally_stats.Rmd | 3 +- vignettes/ggbivariate.Rmd | 4 +- vignettes/ggduo.Rmd | 20 +- vignettes/ggmatrix.Rmd | 10 +- vignettes/ggnetworkmap.Rmd | 4 +- vignettes/ggpairs.Rmd | 6 +- vignettes/ggscatmat.Rmd | 2 +- vignettes/ggsurv.Rmd | 4 +- vignettes/glyph.Rmd | 2 +- 285 files changed, 102262 insertions(+), 1113 deletions(-) delete mode 100644 .github/workflows-ignore/R-CMD-check.yaml delete mode 100644 .github/workflows-ignore/deploy.yaml delete mode 100644 .github/workflows/pkgdown.yaml delete mode 100644 .github/workflows/test-coverage.yaml rename codecov.yml => notes/old-codecov.yml (100%) create mode 100644 tests/testthat/_snaps/gg-plots/cor-green.svg create mode 100644 tests/testthat/_snaps/gg-plots/rescale-false-binwidth.svg create mode 100644 tests/testthat/_snaps/gg-plots/rescale-false.svg create mode 100644 tests/testthat/_snaps/gg-plots/rescale-true-binwidth.svg create mode 100644 tests/testthat/_snaps/gg-plots/rescale-true.svg create mode 100644 tests/testthat/_snaps/gg-plots/shrink-false.svg create mode 100644 tests/testthat/_snaps/gg-plots/shrink-true.svg create mode 100644 tests/testthat/_snaps/gg-plots/smooth-se-false.svg create mode 100644 tests/testthat/_snaps/gg-plots/smooth-se-true.svg create mode 100644 tests/testthat/_snaps/gg-plots/titanic-count-class.svg create mode 100644 tests/testthat/_snaps/gg-plots/titanic-count-diag-class.svg create mode 100644 tests/testthat/_snaps/gg-plots/titanic-count-diag-interaction.svg create mode 100644 tests/testthat/_snaps/gg-plots/titanic-count-diag.svg create mode 100644 tests/testthat/_snaps/gg-plots/titanic-count-interaction.svg create mode 100644 tests/testthat/_snaps/gg-plots/titanic-count-red.svg create mode 100644 tests/testthat/_snaps/gg-plots/titanic-count-sex.svg create mode 100644 tests/testthat/_snaps/gg-plots/titanic-count-toupper.svg create mode 100644 tests/testthat/_snaps/gg-plots/titanic-count.svg create mode 100644 tests/testthat/_snaps/ggbivariate/tips-fill-qual.svg create mode 100644 tests/testthat/_snaps/ggbivariate/tips-legend-3.svg create mode 100644 tests/testthat/_snaps/ggbivariate/tips-legend-default.svg create mode 100644 tests/testthat/_snaps/ggbivariate/tips-numeric.svg create mode 100644 tests/testthat/_snaps/ggbivariate/tips-rowbar.svg create mode 100644 tests/testthat/_snaps/ggbivariate/tips-title.svg create mode 100644 tests/testthat/_snaps/ggbivariate/tips.svg create mode 100644 tests/testthat/_snaps/ggbivariate/titanic-weight-freq.svg create mode 100644 tests/testthat/_snaps/ggcoef/lm-expo-blue.svg create mode 100644 tests/testthat/_snaps/ggcoef/lm-expo.svg create mode 100644 tests/testthat/_snaps/ggcoef/lm.svg create mode 100644 tests/testthat/_snaps/ggcoef_model/contrasts.svg create mode 100644 tests/testthat/_snaps/ggcoef_model/glm-expo-include.svg create mode 100644 tests/testthat/_snaps/ggcoef_model/glm-expo-intercept.svg create mode 100644 tests/testthat/_snaps/ggcoef_model/glm-expo-no-color-rowstrips.svg create mode 100644 tests/testthat/_snaps/ggcoef_model/glm-expo-no-ref.svg create mode 100644 tests/testthat/_snaps/ggcoef_model/glm-expo-significance.svg create mode 100644 tests/testthat/_snaps/ggcoef_model/glm-expo.svg create mode 100644 tests/testthat/_snaps/ggcoef_model/lm-color-nofacet.svg create mode 100644 tests/testthat/_snaps/ggcoef_model/lm-labelled.svg create mode 100644 tests/testthat/_snaps/ggcoef_model/lm-noguide.svg create mode 100644 tests/testthat/_snaps/ggcoef_model/lm-variable-labels-facet.svg create mode 100644 tests/testthat/_snaps/ggcoef_model/lm-variable-labels.svg create mode 100644 tests/testthat/_snaps/ggcoef_model/lm.svg create mode 100644 tests/testthat/_snaps/ggcoef_model/models-faceted.svg create mode 100644 tests/testthat/_snaps/ggcoef_model/models.svg create mode 100644 tests/testthat/_snaps/ggcoef_model/multinom-expo.svg create mode 100644 tests/testthat/_snaps/ggcoef_model/multinom-faceted-ylabel.svg create mode 100644 tests/testthat/_snaps/ggcoef_model/multinom-faceted.svg create mode 100644 tests/testthat/_snaps/ggcoef_model/poly.svg create mode 100644 tests/testthat/_snaps/ggcorr/flea-big-limits.svg create mode 100644 tests/testthat/_snaps/ggcorr/flea-limits.svg create mode 100644 tests/testthat/_snaps/ggcorr/flea-no-limits.svg create mode 100644 tests/testthat/_snaps/ggcorr/flea-null-limits.svg create mode 100644 tests/testthat/_snaps/ggcorr/flea-small-limits.svg create mode 100644 tests/testthat/_snaps/ggcorr/flea.svg create mode 100644 tests/testthat/_snaps/ggcorr/geom-blank.svg create mode 100644 tests/testthat/_snaps/ggcorr/geom-circle-no-limits.svg create mode 100644 tests/testthat/_snaps/ggcorr/geom-circle.svg create mode 100644 tests/testthat/_snaps/ggcorr/geom-tile-no-limits.svg create mode 100644 tests/testthat/_snaps/ggcorr/geom-tile.svg create mode 100644 tests/testthat/_snaps/ggcorr/layout-exp.svg create mode 100644 tests/testthat/_snaps/ggcorr/method-everything.svg create mode 100644 tests/testthat/_snaps/ggfacet/factor.svg create mode 100644 tests/testthat/_snaps/ggfacet/pigs.svg create mode 100644 tests/testthat/_snaps/gglegend/custom.svg create mode 100644 tests/testthat/_snaps/gglegend/internal-legend.svg create mode 100644 tests/testthat/_snaps/gglegend/legend-pm.svg create mode 100644 tests/testthat/_snaps/gglegend/legend.svg create mode 100644 tests/testthat/_snaps/gglegend/plotnew-default.svg create mode 100644 tests/testthat/_snaps/gglegend/points.svg create mode 100644 tests/testthat/_snaps/gglegend/pos-bottom.svg create mode 100644 tests/testthat/_snaps/gglegend/pos-left.svg create mode 100644 tests/testthat/_snaps/gglegend/pos-right.svg create mode 100644 tests/testthat/_snaps/gglegend/pos-top.svg create mode 100644 tests/testthat/_snaps/ggmatrix/blank-1-2-2-1.svg create mode 100644 tests/testthat/_snaps/ggmatrix/blank-1-2.svg create mode 100644 tests/testthat/_snaps/ggmatrix/expression-labels.svg create mode 100644 tests/testthat/_snaps/ggmatrix/not-enough-plots.svg create mode 100644 tests/testthat/_snaps/ggmatrix/proportions.svg create mode 100644 tests/testthat/_snaps/ggnostic/custom-y.svg create mode 100644 tests/testthat/_snaps/ggnostic/legend.svg create mode 100644 tests/testthat/_snaps/ggscatmat/flea-color.svg create mode 100644 tests/testthat/_snaps/ggscatmat/flea-pearson.svg create mode 100644 tests/testthat/_snaps/ggscatmat/flea-rsquare.svg create mode 100644 tests/testthat/_snaps/ggscatmat/flea.svg create mode 100644 tests/testthat/_snaps/ggsurv/plot-cens-true-blue.svg create mode 100644 tests/testthat/_snaps/ggsurv/plot-cens-true-custom-shape.svg create mode 100644 tests/testthat/_snaps/ggsurv/plot-cens-true-custom.svg create mode 100644 tests/testthat/_snaps/ggsurv/plot-cens-true.svg create mode 100644 tests/testthat/_snaps/ggtable/lm.svg create mode 100644 tests/testthat/_snaps/ggtable/tips-cells.svg create mode 100644 tests/testthat/_snaps/ggtable/tips-continuous.svg create mode 100644 tests/testthat/_snaps/ggtable/tips-fill-resid.svg create mode 100644 tests/testthat/_snaps/ggtable/tips-fill-std-resid.svg create mode 100644 tests/testthat/_snaps/ggtable/tips.svg create mode 100644 tests/testthat/_snaps/ggtable/titanic-weight-freq.svg create mode 100644 tests/testthat/_snaps/stat_cross/ex.svg create mode 100644 tests/testthat/_snaps/stat_cross/label.svg create mode 100644 tests/testthat/_snaps/stat_cross/row-prop.svg create mode 100644 tests/testthat/_snaps/stat_cross/shape-22.svg create mode 100644 tests/testthat/_snaps/stat_cross/table-color-fill.svg create mode 100644 tests/testthat/_snaps/stat_cross/table-fill-steps2.svg create mode 100644 tests/testthat/_snaps/stat_cross/table-label.svg create mode 100644 tests/testthat/_snaps/stat_cross/tips-color-equal.svg create mode 100644 tests/testthat/_snaps/stat_cross/tips-diagonal.svg create mode 100644 tests/testthat/_snaps/stat_cross/tips-fill-red.svg create mode 100644 tests/testthat/_snaps/stat_cross/tips-label-custom.svg create mode 100644 tests/testthat/_snaps/stat_cross/tips-label.svg create mode 100644 tests/testthat/_snaps/stat_cross/tips-red-size16.svg create mode 100644 tests/testthat/_snaps/stat_cross/tips-sex.svg create mode 100644 tests/testthat/_snaps/stat_cross/tips-shape.svg create mode 100644 tests/testthat/_snaps/stat_cross/tips-time-color.svg create mode 100644 tests/testthat/_snaps/stat_cross/tips-time.svg create mode 100644 tests/testthat/_snaps/stat_cross/titanic-fill-steps2.svg create mode 100644 tests/testthat/_snaps/stat_prop/ggduo-titanic.svg create mode 100644 tests/testthat/_snaps/stat_prop/tips-bar-width.svg create mode 100644 tests/testthat/_snaps/stat_prop/tips-color-white.svg create mode 100644 tests/testthat/_snaps/stat_prop/tips-label-custom.svg create mode 100644 tests/testthat/_snaps/stat_prop/tips-label.svg create mode 100644 tests/testthat/_snaps/stat_prop/tips-size8.svg create mode 100644 tests/testthat/_snaps/stat_prop/tips.svg create mode 100644 tests/testthat/_snaps/stat_prop/titanic-dodge.svg create mode 100644 tests/testthat/_snaps/stat_prop/titanic-facet.svg create mode 100644 tests/testthat/_snaps/stat_prop/titanic-stack.svg create mode 100644 tests/testthat/_snaps/stat_prop/titanic-stat-prop.svg create mode 100644 tests/testthat/_snaps/stat_prop/titanic.svg create mode 100644 tests/testthat/_snaps/stat_weighted_mean/geom-bar-dodge-percent.svg create mode 100644 tests/testthat/_snaps/stat_weighted_mean/geom-bar-dodge.svg create mode 100644 tests/testthat/_snaps/stat_weighted_mean/geom-default.svg create mode 100644 tests/testthat/_snaps/stat_weighted_mean/geom-line-grouped.svg create mode 100644 tests/testthat/_snaps/stat_weighted_mean/geom-line.svg create mode 100644 tests/testthat/_snaps/stat_weighted_mean/point.svg create mode 100644 tests/testthat/_snaps/stat_weighted_mean/titanic.svg create mode 100644 tests/testthat/_snaps/stat_weighted_mean/trends-binary-color.svg create mode 100644 tests/testthat/_snaps/stat_weighted_mean/trends-binary.svg create mode 100644 tests/testthat/_snaps/stat_weighted_mean/trends-color.svg create mode 100644 tests/testthat/_snaps/stat_weighted_mean/trends-incl-zero-false.svg create mode 100644 tests/testthat/_snaps/stat_weighted_mean/trends-incl-zero-true.svg create mode 100644 tests/testthat/_snaps/stat_weighted_mean/trends-many-color.svg create mode 100644 tests/testthat/_snaps/stat_weighted_mean/trends-many.svg create mode 100644 tests/testthat/_snaps/stat_weighted_mean/trends-size-3.svg create mode 100644 tests/testthat/_snaps/stat_weighted_mean/trends-titanic.svg create mode 100644 tests/testthat/_snaps/stat_weighted_mean/trends.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/axislabels-ggduo-none.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/axislabels-ggduo-show.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/axislabels-ggpairs-internal.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/axislabels-ggpairs-none.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/axislabels-ggpairs-show.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggduo-autopoint-autopoint-autopoint-autopointdiag-autopointdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggduo-blank-denstrip-table-blankdiag-blankdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggduo-blank-facetdensitystrip-rowbar-blankdiag-blankdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggduo-color-autopoint-autopoint-autopoint-autopointdiag-autopointdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggduo-color-blank-denstrip-table-blankdiag-blankdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggduo-color-blank-facetdensitystrip-rowbar-blankdiag-blankdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggduo-color-cor-facetdensity-ratio-blankdiag-blankdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggduo-color-density-box-colbar-densitydiag-bardiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggduo-color-points-dot-count-bardiag-countdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggduo-color-smooth-box-no-facet-cross-blankdiag-tablediag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggduo-color-smooth-lm-dot-no-facet-crosstable-blankdiag-blankdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggduo-color-smooth-loess-facethist-facetbar-blankdiag-blankdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggduo-cor-facetdensity-ratio-blankdiag-blankdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggduo-density-box-colbar-densitydiag-bardiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggduo-points-dot-count-bardiag-countdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggduo-smooth-box-no-facet-cross-blankdiag-tablediag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggduo-smooth-lm-dot-no-facet-crosstable-blankdiag-blankdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggduo-smooth-loess-facethist-facetbar-blankdiag-blankdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggpairs-autopoint-autopoint-autopoint-autopointdiag-autopointdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggpairs-blank-denstrip-table-blankdiag-blankdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggpairs-blank-facetdensitystrip-rowbar-blankdiag-blankdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-autopoint-autopoint-autopoint-autopointdiag-autopointdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-blank-denstrip-table-blankdiag-blankdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-blank-facetdensitystrip-rowbar-blankdiag-blankdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-cor-facetdensity-ratio-blankdiag-blankdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-density-box-colbar-densitydiag-bardiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-points-dot-count-bardiag-countdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-smooth-box-no-facet-cross-blankdiag-tablediag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-smooth-lm-dot-no-facet-crosstable-blankdiag-blankdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-smooth-loess-facethist-facetbar-blankdiag-blankdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggpairs-cor-facetdensity-ratio-blankdiag-blankdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggpairs-density-box-colbar-densitydiag-bardiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggpairs-points-dot-count-bardiag-countdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggpairs-smooth-box-no-facet-cross-blankdiag-tablediag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggpairs-smooth-lm-dot-no-facet-crosstable-blankdiag-blankdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/ggpairs-smooth-loess-facethist-facetbar-blankdiag-blankdiag.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/nested-strips-default.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/nested-strips-true.svg create mode 100644 tests/testthat/_snaps/zzz_ggpairs/show-strips.svg diff --git a/.Rbuildignore b/.Rbuildignore index 78b9c2c07..a1ebb383d 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -12,6 +12,7 @@ figure ggmapTemp.png README.html notes/ +tests/testthat/_snaps tests/testthat/Rplots.pdf ^.*\.Rproj$ ^\.Rproj\.user$ diff --git a/.github/workflows-ignore/R-CMD-check.yaml b/.github/workflows-ignore/R-CMD-check.yaml deleted file mode 100644 index f0f8c38da..000000000 --- a/.github/workflows-ignore/R-CMD-check.yaml +++ /dev/null @@ -1,91 +0,0 @@ -on: - push: - branches: - - master - pull_request: - branches: - - master - -name: R-CMD-check - -jobs: - R-CMD-check: - runs-on: ${{ matrix.config.os }} - - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) - - strategy: - fail-fast: false - matrix: - config: - - {os: windows-latest, r: '3.6'} - - {os: macOS-latest, r: '3.6'} - - {os: macOS-latest, r: 'devel'} - - {os: ubuntu-16.04, r: '3.2', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"} - - {os: ubuntu-16.04, r: '3.3', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"} - - {os: ubuntu-16.04, r: '3.4', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"} - - {os: ubuntu-16.04, r: '3.5', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"} - - {os: ubuntu-16.04, r: '3.6', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"} - - env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - CRAN: ${{ matrix.config.cran }} - - steps: - - uses: actions/checkout@v1 - - - uses: r-lib/actions/setup-r@master - with: - r-version: ${{ matrix.config.r }} - - - uses: r-lib/actions/setup-pandoc@master - - - name: Query dependencies - run: > - Rscript - -e "install.packages('remotes')" - -e "saveRDS(remotes::dev_package_deps(dependencies = TRUE), 'depends.Rds', version = 2)" - - - name: Cache R packages - if: runner.os != 'Windows' - uses: actions/cache@v1 - with: - path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }} - restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}- - - - name: Install system dependencies - if: false - # if: runner.os == 'Linux' - env: - RHUB_PLATFORM: linux-x86_64-ubuntu-gcc - run: | - Rscript -e "remotes::install_github('r-hub/sysreqs')" - sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))") - sudo -s eval "$sysreqs" - - - name: Install dependencies - run: > - Rscript - -e "library(remotes)" - -e "remotes::install_cran(c('statnet.common', 'mvtnorm'), repos = c(CRAN = 'https://cloud.r-project.org/'))" - -e "update(readRDS('depends.Rds'))" - -e "remotes::install_cran('rcmdcheck')" - - - name: Check - run: > - Rscript - -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'warning', check_dir = 'check')" - - - name: Upload check results - if: failure() - uses: actions/upload-artifact@master - with: - name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: check - - - name: Test coverage - if: matrix.config.os == 'macOS-latest' && matrix.config.r == '3.6' - run: > - Rscript - -e 'covr::codecov(token = "${{secrets.CODECOV_TOKEN}}")' diff --git a/.github/workflows-ignore/deploy.yaml b/.github/workflows-ignore/deploy.yaml deleted file mode 100644 index 95e2f547e..000000000 --- a/.github/workflows-ignore/deploy.yaml +++ /dev/null @@ -1,65 +0,0 @@ -on: - push: - branches: - - master - -name: Deploy - -jobs: - deploy: - runs-on: ${{ matrix.config.os }} - - name: Deploy - - strategy: - fail-fast: false - matrix: - config: - - {os: ubuntu-16.04, r: '3.6', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"} - - env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - CRAN: ${{ matrix.config.cran }} - - steps: - - uses: actions/checkout@v1 - - - uses: r-lib/actions/setup-r@master - with: - r-version: ${{ matrix.config.r }} - - - uses: r-lib/actions/setup-pandoc@master - - - name: Query dependencies - run: > - Rscript - -e "install.packages('remotes')" - -e "saveRDS(remotes::dev_package_deps(dependencies = TRUE), 'depends.Rds', version = 2)" - - - name: Cache R packages - if: runner.os != 'Windows' - uses: actions/cache@v1 - with: - path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }} - restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}- - - - name: Install dependencies - run: > - Rscript - -e "library(remotes)" - -e "update(readRDS('depends.Rds'))" - -e "remotes::install_cran('packagedocs')" - - - name: Deploy - env: - CAN_PRINT: "TRUE" - run: > - Rscript - -e "packagedocs::deploy_travis(valid_branches = 'master')" - - name: Deploy to GitHub Pages - if: github.ref == 'refs/heads/master' - uses: maxheld83/ghpages@v0.2.0 - env: - BUILD_DIR: docs - GH_PAT: ${{ secrets.GH_PAT }} diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 271d466eb..c7298b32a 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,46 +1,23 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples -# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +# Workflow derived from https://github.com/rstudio/shiny-workflows +# +# NOTE: This Shiny team GHA workflow is overkill for most R packages. +# For most R packages it is better to use https://github.com/r-lib/actions on: push: - branches: [main, master] + branches: [master, rc-**] pull_request: - branches: [main, master] + branches: [master] + schedule: + - cron: '0 5 * * 1' # every monday -name: R-CMD-check +name: Package checks jobs: + website: + uses: rstudio/shiny-workflows/.github/workflows/website.yaml@v1 + routine: + uses: rstudio/shiny-workflows/.github/workflows/routine.yaml@v1 R-CMD-check: - runs-on: ${{ matrix.config.os }} - - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) - - strategy: - fail-fast: false - matrix: - config: - - {os: macOS-latest, r: 'release'} - - {os: windows-latest, r: 'release'} - - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} - - {os: ubuntu-latest, r: 'release'} - - {os: ubuntu-latest, r: 'oldrel-1'} - - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - R_KEEP_PKG_SOURCE: yes - - steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-pandoc@v1 - - - uses: r-lib/actions/setup-r@v1 - with: - r-version: ${{ matrix.config.r }} - http-user-agent: ${{ matrix.config.http-user-agent }} - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v1 - with: - extra-packages: rcmdcheck - - - uses: r-lib/actions/check-r-package@v1 + uses: rstudio/shiny-workflows/.github/workflows/R-CMD-check.yaml@v1 + with: + minimum-r-version: "4.1.0" diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml deleted file mode 100644 index 63cbb18a1..000000000 --- a/.github/workflows/pkgdown.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples -# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help -on: - push: - branches: [main, master] - release: - types: [published] - workflow_dispatch: - -name: pkgdown - -jobs: - pkgdown: - runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-pandoc@v1 - - - uses: r-lib/actions/setup-r@v1 - with: - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v1 - with: - extra-packages: pkgdown - needs: website - - - name: Deploy package - run: | - git config --local user.name "$GITHUB_ACTOR" - git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" - Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml deleted file mode 100644 index 3c0da1c97..000000000 --- a/.github/workflows/test-coverage.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples -# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help -on: - push: - branches: [main, master] - pull_request: - branches: [main, master] - -name: test-coverage - -jobs: - test-coverage: - runs-on: ubuntu-latest - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - - steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-r@v1 - with: - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v1 - with: - extra-packages: covr - - - name: Test coverage - run: covr::codecov() - shell: Rscript {0} diff --git a/.lintr b/.lintr index 399e7049c..fdfcde877 100644 --- a/.lintr +++ b/.lintr @@ -1,7 +1,9 @@ -linters: with_defaults( - camel_case_linter = NULL, +linters: linters_with_defaults( + cyclocomp_linter = NULL, commented_code_linter = NULL, - line_length_linter = NULL + line_length_linter = NULL, + object_name_linter = NULL, + seq_linter = NULL ) exclusions: list( diff --git a/DESCRIPTION b/DESCRIPTION index b9eaefe38..245f21493 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -68,7 +68,8 @@ Suggests: crosstalk, knitr, spelling, - emmeans + emmeans, + vdiffr Roxygen: list(markdown = TRUE) RoxygenNote: 7.2.1 SystemRequirements: openssl diff --git a/R/deprecated.R b/R/deprecated.R index d38e95042..205809954 100644 --- a/R/deprecated.R +++ b/R/deprecated.R @@ -77,7 +77,7 @@ ggally_cor_v1_5 <- function( corAlignPercent = NULL, corMethod = NULL, corUse = NULL, displayGrid = TRUE, ... -){ +) { if (! is.null(corAlignPercent)) { stop("'corAlignPercent' is deprecated. Please use argument 'alignPercent'") @@ -177,14 +177,14 @@ ggally_cor_v1_5 <- function( } } } else { - if (length(names(mapping)) > 0){ - for (i in length(names(mapping)):1){ + if (length(names(mapping)) > 0) { + for (i in length(names(mapping)):1) { # find the last value of the aes, such as cyl of as.factor(cyl) tmp_map_val <- deparse(mapping[names(mapping)[i]][[1]]) if (tmp_map_val[length(tmp_map_val)] %in% colnames(data)) mapping[[names(mapping)[i]]] <- NULL - if (length(names(mapping)) < 1){ + if (length(names(mapping)) < 1) { mapping <- NULL break; } @@ -212,7 +212,7 @@ ggally_cor_v1_5 <- function( lev <- levels(as.factor(colorData)) ord <- rep(-1, nrow(cord)) for (i in 1:nrow(cord)) { - for (j in seq_along(lev)){ + for (j in seq_along(lev)) { if (identical(as.character(cord$color[i]), as.character(lev[j]))) { ord[i] <- j } diff --git a/R/find-combo.R b/R/find-combo.R index 8e28a47b8..8a23b7d74 100644 --- a/R/find-combo.R +++ b/R/find-combo.R @@ -90,7 +90,7 @@ find_plot_type <- function(col1Name, col2Name, type1, type2, isAllNa, allowDiag) } } - if (type1 == "na" | type2 == "na") { + if (type1 == "na" || type2 == "na") { return("na") } diff --git a/R/geom_stripped_rows.R b/R/geom_stripped_rows.R index fd9dae973..acf446111 100644 --- a/R/geom_stripped_rows.R +++ b/R/geom_stripped_rows.R @@ -175,4 +175,3 @@ GeomStrippedCols <- ggplot2::ggproto("GeomStrippedCols", ggplot2::Geom, ) } ) - diff --git a/R/gg-plots.R b/R/gg-plots.R index dd89403dd..d5938e3bb 100644 --- a/R/gg-plots.R +++ b/R/gg-plots.R @@ -131,7 +131,7 @@ remove_color_unless_equal <- function(mapping, to = c("x", "y")) { #' size = "gear" #' ) #' )) -ggally_points <- function(data, mapping, ...){ +ggally_points <- function(data, mapping, ...) { p <- ggplot(data = data, mapping = mapping) + geom_point(...) @@ -221,7 +221,7 @@ ggally_smooth_lm <- function(data, mapping, ...) { #' tips, #' mapping = ggplot2::aes_string(x = "total_bill", y = "tip", fill = "..level..") #' ) + ggplot2::scale_fill_gradient(breaks = c(0.05, 0.1, 0.15, 0.2))) -ggally_density <- function(data, mapping, ...){ +ggally_density <- function(data, mapping, ...) { rangeX <- range(eval_data_col(data, mapping$x), na.rm = TRUE) rangeY <- range(eval_data_col(data, mapping$y), na.rm = TRUE) @@ -500,7 +500,7 @@ ggally_statistic <- function( lev <- levels(as.factor(colorData)) ord <- rep(-1, nrow(cord)) for (i in 1:nrow(cord)) { - for (j in seq_along(lev)){ + for (j in seq_along(lev)) { if (identical(as.character(cord$color[i]), as.character(lev[j]))) { ord[i] <- j } @@ -617,7 +617,7 @@ ggally_statistic <- function( #' outlier.shape = 13, #' outlier.size = 8 #' )) -ggally_box <- function(data, mapping, ...){ +ggally_box <- function(data, mapping, ...) { mapping <- mapping_color_to_fill(mapping) ggally_dot_and_box(data, mapping, ..., boxPlot = TRUE) @@ -655,8 +655,8 @@ ggally_box_no_facet <- function(data, mapping, ...) { #' p_(ggally_dot( #' tips, #' mapping = ggplot2::aes_string(y = "total_bill", x = "sex", color = "sex", shape = "sex") -#' ) + ggplot2::scale_shape(solid=FALSE)) -ggally_dot <- function(data, mapping, ...){ +#' ) + ggplot2::scale_shape(solid = FALSE)) +ggally_dot <- function(data, mapping, ...) { ggally_dot_and_box(data, mapping, ..., boxPlot = FALSE) } #' @export @@ -692,7 +692,7 @@ ggally_dot_no_facet <- function(data, mapping, ...) { #' mapping = ggplot2::aes(x = total_bill, y = sex, color = sex), #' boxPlot = FALSE #' )) -ggally_dot_and_box <- function(data, mapping, ..., boxPlot = TRUE){ +ggally_dot_and_box <- function(data, mapping, ..., boxPlot = TRUE) { horizontal <- is_horizontal(data, mapping) @@ -771,7 +771,7 @@ ggally_dot_and_box_no_facet <- function(data, mapping, ..., boxPlot = TRUE) { #' data(tips, package = "reshape") #' p_(ggally_facethist(tips, mapping = ggplot2::aes(x = tip, y = sex))) #' p_(ggally_facethist(tips, mapping = ggplot2::aes_string(x = "tip", y = "sex"), binwidth = 0.1)) -ggally_facethist <- function(data, mapping, ...){ +ggally_facethist <- function(data, mapping, ...) { mapping <- mapping_color_to_fill(mapping) @@ -824,7 +824,7 @@ ggally_facethist <- function(data, mapping, ...){ #' tips, #' mapping = ggplot2::aes_string(y = "total_bill", x = "sex", color = "sex") #' )) -ggally_facetdensity <- function(data, mapping, ...){ +ggally_facetdensity <- function(data, mapping, ...) { ggally_facetdensitystrip(data, mapping, ..., den_strip = FALSE) } @@ -849,7 +849,7 @@ ggally_facetdensity <- function(data, mapping, ...){ #' tips, #' mapping = ggplot2::aes_string(x = "sex", y = "tip", binwidth = "0.2") #' ) + ggplot2::scale_fill_gradient(low = "grey80", high = "black")) -ggally_denstrip <- function(data, mapping, ...){ +ggally_denstrip <- function(data, mapping, ...) { mapping <- mapping_color_to_fill(mapping) ggally_facetdensitystrip(data, mapping, ..., den_strip = TRUE) @@ -869,7 +869,7 @@ ggally_denstrip <- function(data, mapping, ...){ #' @examples #' example(ggally_facetdensity) #' example(ggally_denstrip) -ggally_facetdensitystrip <- function(data, mapping, ..., den_strip = FALSE){ +ggally_facetdensitystrip <- function(data, mapping, ..., den_strip = FALSE) { horizontal <- is_horizontal(data, mapping) if (!horizontal) { @@ -946,7 +946,7 @@ ggally_facetdensitystrip <- function(data, mapping, ..., den_strip = FALSE){ #' data(tips, package = "reshape") #' p_(ggally_densityDiag(tips, mapping = ggplot2::aes(x = total_bill))) #' p_(ggally_densityDiag(tips, mapping = ggplot2::aes(x = total_bill, color = day))) -ggally_densityDiag <- function(data, mapping, ..., rescale = FALSE){ +ggally_densityDiag <- function(data, mapping, ..., rescale = FALSE) { mapping <- mapping_color_to_fill(mapping) @@ -988,7 +988,7 @@ ggally_densityDiag <- function(data, mapping, ..., rescale = FALSE){ #' data(tips, package = "reshape") #' p_(ggally_barDiag(tips, mapping = ggplot2::aes(x = day))) #' p_(ggally_barDiag(tips, mapping = ggplot2::aes(x = tip), binwidth = 0.25)) -ggally_barDiag <- function(data, mapping, ..., rescale = FALSE){ +ggally_barDiag <- function(data, mapping, ..., rescale = FALSE) { mapping <- mapping_color_to_fill(mapping) @@ -1055,7 +1055,7 @@ ggally_text <- function( xrange = c(0, 1), yrange = c(0, 1), ... -){ +) { theme <- theme_get() @@ -1086,17 +1086,17 @@ ggally_text <- function( # dont mess with color if it's already there if (!is.null(mapping$colour)) { p <- p + - geom_text( label = label, mapping = mapping, ...) + + geom_text(label = label, mapping = mapping, ...) + guides(colour = "none") } else if ("colour" %in% names(aes(...))) { p <- p + - geom_text( label = label, mapping = mapping, ...) + geom_text(label = label, mapping = mapping, ...) } else { bg <- ifnull(theme$panel.background$fill, "grey92") fg <- ifnull(theme$axis.text$colour, "gray30") colour <- scales::colour_ramp(c(bg, fg))(0.75) p <- p + - geom_text( label = label, mapping = mapping, colour = colour, ...) + geom_text(label = label, mapping = mapping, colour = colour, ...) } p <- p + theme(legend.position = "none") @@ -1122,7 +1122,7 @@ get_x_axis_labels <- function(p, xRange) { # have to do a function as filter doesn't work get_raw_grob_by_name <- function(g, name) { for (item in g$grobs) { - if (str_detect(item$name, name) ) { + if (str_detect(item$name, name)) { return(item$children[[1]]) } } @@ -1197,8 +1197,8 @@ get_x_axis_labels <- function(p, xRange) { #' p_ <- GGally::print_if_interactive #' #' data(tips, package = "reshape") -#' p_(ggally_diagAxis(tips, ggplot2::aes(x=tip))) -#' p_(ggally_diagAxis(tips, ggplot2::aes(x=sex))) +#' p_(ggally_diagAxis(tips, ggplot2::aes(x = tip))) +#' p_(ggally_diagAxis(tips, ggplot2::aes(x = sex))) ggally_diagAxis <- function( data, mapping, @@ -1298,8 +1298,8 @@ ggally_diagAxis <- function( p$scales$scales[[1]]$breaks <- axisBreaks p$scales$scales[[2]]$breaks <- axisBreaks # pLabs <- pLabs + - # scale_x_continuous(breaks=axisBreaks,limits=c(0,1)) + - # scale_y_continuous(breaks=axisBreaks,limits=c(0,1)) + # scale_x_continuous(breaks = axisBreaks, limits = c(0, 1)) + + # scale_y_continuous(breaks = axisBreaks, limits = c(0, 1)) } p @@ -1323,11 +1323,11 @@ ggally_diagAxis <- function( #' data(tips, package = "reshape") #' p_(ggally_facetbar(tips, ggplot2::aes(x = sex, y = smoker, fill = time))) #' p_(ggally_facetbar(tips, ggplot2::aes(x = smoker, y = sex, fill = time))) -ggally_facetbar <- function(data, mapping, ...){ +ggally_facetbar <- function(data, mapping, ...) { mapping <- mapping_color_to_fill(mapping) - # numer <- is.null(attributes(data[,as.character(mapping$x)])$class) + # numer <- is.null(attributes(data[, as.character(mapping$x)])$class) # xVal <- mapping$x yVal <- mapping_string(mapping$y) mapping$y <- NULL @@ -1484,7 +1484,7 @@ ggally_count <- function(data, mapping, ...) { # default values args <- list(...) - if (!"fill" %in% names(args) & is.null(mapping$fill)) { + if (!"fill" %in% names(args) && is.null(mapping$fill)) { args$fill <- GeomRect$default_aes$fill } @@ -1559,7 +1559,7 @@ StatGGallyCount <- ggproto("StatGGallyCount", Stat, if (is.null(data$weight)) data$weight <- rep(1, nrow(data)) - if(is.null(x.width)) + if (is.null(x.width)) x.width <- .9 # sum weights for each combination of aesthetics @@ -1569,7 +1569,9 @@ StatGGallyCount <- ggproto("StatGGallyCount", Stat, names(panel)[which(names(panel) == "weight")] <- "n" # compute proportions by x and y - f <- function(n) {sum(abs(n), na.rm = TRUE)} + f <- function(n) { + sum(abs(n), na.rm = TRUE) + } panel$n_xy <- stats::ave(panel$n, panel$x, panel$base_y, FUN = f) panel$prop <- panel$n / panel$n_xy panel$width <- sqrt(panel$n_xy) / max(sqrt(panel$n_xy)) * x.width @@ -1607,12 +1609,12 @@ ggally_countDiag <- function(data, mapping, ...) { #' @seealso [ggplot2::element_blank()] #' @export #' @keywords hplot -ggally_blank <- function(...){ +ggally_blank <- function(...) { aes(...) # ignored a <- data.frame(X = 1:2, Y = 1:2) p <- ggplot(data = a, aes_string(x = "X", y = "Y")) + - geom_point( colour = "transparent") + + geom_point(colour = "transparent") + theme( axis.line = element_blank(), axis.text.x = element_blank(), @@ -1730,7 +1732,7 @@ ggally_autopoint <- function(data, mapping, ...) { require_namespaces("ggforce") args <- list(...) - if (!"alpha" %in% names(args) & is.null(mapping$alpha)) + if (!"alpha" %in% names(args) && is.null(mapping$alpha)) args$alpha <- .5 # mapping needs to be sent directly to geom_autopoint args$mapping <- mapping @@ -1791,13 +1793,13 @@ ggally_summarise_by <- function( mapping, text_fn = weighted_median_iqr, text_fn_vertical = NULL, - ...) -{ + ... +) { if (is.null(mapping$x)) stop("'x' aesthetic is required.") if (is.null(mapping$y)) stop("'y' aesthetic is required.") horizontal <- is_horizontal(data, mapping) - if(horizontal) { + if (horizontal) { res <- ddply( data.frame( x = eval_data_col(data, mapping$x), @@ -1805,7 +1807,7 @@ ggally_summarise_by <- function( weight = eval_data_col(data, mapping$weight) %||% 1, stringsAsFactors = FALSE ), - c('y'), + c("y"), plyr::here(summarize), label = text_fn(x, weight) ) diff --git a/R/ggbivariate.R b/R/ggbivariate.R index 84c2ca9be..9b79081a5 100644 --- a/R/ggbivariate.R +++ b/R/ggbivariate.R @@ -81,7 +81,7 @@ ggbivariate <- function( if (is.null(rowbar_args$remove_background)) rowbar_args$remove_background <- TRUE if (is.null(types$discrete)) - types$discrete = wrapp(ggally_rowbar, rowbar_args) + types$discrete <- wrapp(ggally_rowbar, rowbar_args) if (is.null(types$comboVertical)) types$comboVertical <- "box_no_facet" if (is.null(types$continuous)) @@ -99,7 +99,7 @@ ggbivariate <- function( if (!"yProportions" %in% names(ggduo_args)) ggduo_args$yProportions <- "auto" - if (!is.numeric(data[[outcome]]) & !"legend" %in% names(list(...))) + if (!is.numeric(data[[outcome]]) && !"legend" %in% names(list(...))) ggduo_args$legend <- 1 p <- do.call(ggduo, ggduo_args) + diff --git a/R/ggcoef.R b/R/ggcoef.R index f99795467..ef809e76b 100644 --- a/R/ggcoef.R +++ b/R/ggcoef.R @@ -114,7 +114,7 @@ ggcoef <- function( ) } } - if (conf.int & "conf.low" %in% names(x) & "conf.high" %in% names(x)) + if (conf.int && "conf.low" %in% names(x) && "conf.high" %in% names(x)) p <- p + geom_errorbarh( aes_string(xmin = "conf.low", xmax = "conf.high"), color = errorbar_color, diff --git a/R/ggcoef_model.R b/R/ggcoef_model.R index 2b715c48b..b1ceb9eaa 100644 --- a/R/ggcoef_model.R +++ b/R/ggcoef_model.R @@ -142,7 +142,7 @@ #' p_(ggcoef_model(mod2)) #' } #' } -ggcoef_model <- function ( +ggcoef_model <- function( model, tidy_fun = broom.helpers::tidy_with_broom_or_parameters, conf.int = TRUE, @@ -162,7 +162,7 @@ ggcoef_model <- function ( signif_stars = TRUE, return_data = FALSE, ... -){ +) { data <- ggcoef_data( model = model, tidy_fun = tidy_fun, @@ -181,14 +181,14 @@ ggcoef_model <- function ( significance_labels = significance_labels ) - if (show_p_values & signif_stars) + if (show_p_values && signif_stars) data$add_to_label <- paste0(data$p_value_label, data$signif_stars) - if (show_p_values & !signif_stars) + if (show_p_values && !signif_stars) data$add_to_label <- data$p_value_label - if (!show_p_values & signif_stars) + if (!show_p_values && signif_stars) data$add_to_label <- data$signif_stars - if (show_p_values | signif_stars) { + if (show_p_values || signif_stars) { data$label <- forcats::fct_inorder( factor( paste0( @@ -217,7 +217,7 @@ ggcoef_model <- function ( if (!"y" %in% names(args) && !"facet_row" %in% names(args)) args$y <- "label_light" - if (!"colour" %in% names(args) & !all(is.na(data$var_label))) { + if (!"colour" %in% names(args) && !all(is.na(data$var_label))) { args$colour <- "var_label" if (!"colour_guide" %in% names(args)) { args$colour_guide <- FALSE @@ -249,7 +249,7 @@ ggcoef_model <- function ( #' p_(ggcoef_compare(models, dodged_width = -.9)) #' } #' } -ggcoef_compare <- function ( +ggcoef_compare <- function( models, type = c("dodged", "faceted"), tidy_fun = broom.helpers::tidy_with_broom_or_parameters, @@ -268,7 +268,7 @@ ggcoef_compare <- function ( significance_labels = NULL, return_data = FALSE, ... -){ +) { data <- lapply( X = models, FUN = ggcoef_data, @@ -339,7 +339,7 @@ ggcoef_compare <- function ( if (!"facet_col" %in% names(args)) { args$facet_col <- "model" } - if (!"colour" %in% names(args) & !all(is.na(data$var_label))) { + if (!"colour" %in% names(args) && !all(is.na(data$var_label))) { args$colour <- "var_label" if (!"colour_guide" %in% names(args)) { args$colour_guide <- FALSE @@ -369,7 +369,7 @@ ggcoef_compare <- function ( #' ) #' )) #' } -ggcoef_multinom <- function ( +ggcoef_multinom <- function( model, type = c("dodged", "faceted"), y.level_label = NULL, @@ -391,7 +391,7 @@ ggcoef_multinom <- function ( signif_stars = TRUE, return_data = FALSE, ... -){ +) { data <- ggcoef_data( model, tidy_fun = tidy_fun, @@ -410,13 +410,15 @@ ggcoef_multinom <- function ( significance_labels = significance_labels ) - if (!is.null(y.level_label)) + if (!is.null(y.level_label)) { data$y.level <- factor( data$y.level, levels = names(y.level_label), labels = y.level_label - ) else + ) + } else { data$y.level <- .in_order(data$y.level) + } if (return_data) return(data) @@ -443,7 +445,7 @@ ggcoef_multinom <- function ( if (!"facet_col" %in% names(args)) { args$facet_col <- "y.level" } - if (!"colour" %in% names(args) & !all(is.na(data$var_label))) { + if (!"colour" %in% names(args) && !all(is.na(data$var_label))) { args$colour <- "var_label" if (!"colour_guide" %in% names(args)) { args$colour_guide <- FALSE @@ -455,7 +457,7 @@ ggcoef_multinom <- function ( } # not exporting ggcoef_data -ggcoef_data <- function ( +ggcoef_data <- function( model, tidy_fun = broom.helpers::tidy_with_broom_or_parameters, conf.int = TRUE, @@ -471,7 +473,7 @@ ggcoef_data <- function ( include = dplyr::everything(), significance = conf.level, significance_labels = NULL -){ +) { if (!requireNamespace("broom.helpers", quietly = TRUE)) stop("Package broom.helpers is required.") @@ -502,7 +504,7 @@ ggcoef_data <- function ( significance <- NULL } - if(!is.null(significance)) { + if (!is.null(significance)) { if (is.null(significance_labels)) significance_labels <- paste(c("p \u2264", "p >"), significance) data$significance <- factor( @@ -574,7 +576,7 @@ ggcoef_data <- function ( #' if labels are too long, you can use [ggplot2::label_wrap_gen()] (see examples), #' more information in the documentation of [ggplot2::facet_grid()] #' @export -ggcoef_plot <- function ( +ggcoef_plot <- function( data, x = "estimate", y = "label", @@ -603,7 +605,7 @@ ggcoef_plot <- function ( facet_row = "var_label", facet_col = NULL, facet_labeller = "label_value" -){ +) { data[[y]] <- forcats::fct_rev(.in_order(data[[y]])) if (!is.null(facet_row)) data[[facet_row]] <- .in_order(data[[facet_row]]) @@ -624,14 +626,14 @@ ggcoef_plot <- function ( mapping <- aes_string(x = x, y = y) errorbar <- errorbar & all(c("conf.low", "conf.high") %in% names(data)) - if(errorbar) { + if (errorbar) { mapping$xmin <- aes_string(xmin = "conf.low")$xmin mapping$xmax <- aes_string(xmax = "conf.high")$xmax } - if(!is.null(shape) && shape %in% names(data)) { + if (!is.null(shape) && shape %in% names(data)) { mapping$shape <- aes_string(shape = shape)$shape } - if(!is.null(colour) && colour %in% names(data)) { + if (!is.null(colour) && colour %in% names(data)) { mapping$colour <- aes_string(colour = colour)$colour mapping$group <- aes_string(group = colour)$group } @@ -657,8 +659,8 @@ ggcoef_plot <- function ( if (vline) p <- p + geom_vline(xintercept = ifelse(exponentiate, 1, 0), colour = vline_colour) - if(errorbar) { - if (!is.null(colour) & errorbar_coloured) { + if (errorbar) { + if (!is.null(colour) && errorbar_coloured) { p <- p + geom_errorbarh( na.rm = TRUE, @@ -677,9 +679,9 @@ ggcoef_plot <- function ( } } - if (!is.null(facet_col) & is.character(facet_col)) + if (!is.null(facet_col) && is.character(facet_col)) facet_col <- vars(!!sym(facet_col)) - if (!is.null(facet_row) & is.character(facet_row)) + if (!is.null(facet_row) && is.character(facet_row)) facet_row <- vars(!!sym(facet_row)) p <- p + @@ -713,7 +715,7 @@ ggcoef_plot <- function ( axis.ticks.y = element_blank() ) - if(!is.null(colour) && colour %in% names(data)) { + if (!is.null(colour) && colour %in% names(data)) { if (colour_guide) { colour_guide <- guide_legend() } else { @@ -724,7 +726,7 @@ ggcoef_plot <- function ( labs(colour = colour_lab) } - if(!is.null(shape) && shape %in% names(data)) { + if (!is.null(shape) && shape %in% names(data)) { if (shape_guide) { shape_guide <- guide_legend() } else { diff --git a/R/ggcorr.R b/R/ggcorr.R index 6f870e7cf..992987197 100644 --- a/R/ggcorr.R +++ b/R/ggcorr.R @@ -222,7 +222,7 @@ ggcorr <- function( m$.ggally_ggcorr_row_names = rownames(m) m = reshape::melt(m, id.vars = ".ggally_ggcorr_row_names") names(m) = c("x", "y", "coefficient") - m$coefficient[ m$coefficient == 0 ] = NA + m$coefficient[m$coefficient == 0] = NA # -- correlation quantiles --------------------------------------------------- @@ -437,7 +437,7 @@ ggcorr <- function( # -- horizontal scale expansion ---------------------------------------------- - textData <- m[ m$x == m$y & is.na(m$coefficient), ] + textData <- m[m$x == m$y & is.na(m$coefficient), ] xLimits <- levels(textData$y) textData$diagLabel <- textData$x diff --git a/R/ggfacet.R b/R/ggfacet.R index 8198aa9bd..7ace2f611 100644 --- a/R/ggfacet.R +++ b/R/ggfacet.R @@ -16,7 +16,7 @@ #' p_ <- GGally::print_if_interactive #' if (requireNamespace("chemometrics", quietly = TRUE)) { #' data(NIR, package = "chemometrics") -#' NIR_sub <- data.frame(NIR$yGlcEtOH, NIR$xNIR[,1:3]) +#' NIR_sub <- data.frame(NIR$yGlcEtOH, NIR$xNIR[, 1:3]) #' str(NIR_sub) #' x_cols <- c("X1115.0", "X1120.0", "X1125.0") #' y_cols <- c("Glucose", "Ethanol") @@ -58,8 +58,8 @@ ggfacet <- function( # fix args if ( - !missing(mapping) & !is.list(mapping) & - !missing(columnsX) & missing(columnsY) + !missing(mapping) && !is.list(mapping) && + !missing(columnsX) && missing(columnsY) ) { columnsY <- columnsX columnsX <- mapping @@ -77,8 +77,8 @@ ggfacet <- function( # mtc$cyl <- as.factor(mtc$cyl) # ggfacet( # mtc, - # columnsY = c(1,3,4,5), columnsX = c("am", "cyl"), - # fn = function(data, mapping){ggplot(data, mapping) + geom_boxplot()} + # columnsY = c(1, 3, 4, 5), columnsX = c("am", "cyl"), + # fn = function(data, mapping) {ggplot(data, mapping) + geom_boxplot()} # ) is_factor_x <- sapply(data[columnsX], is.factor) if (sum(is_factor_x) != 0) { diff --git a/R/gglyph.R b/R/gglyph.R index 14a42a8ca..f9bcf3fc5 100644 --- a/R/gglyph.R +++ b/R/gglyph.R @@ -30,7 +30,7 @@ #' nasa$long >= -80 & #' nasa$long <= -60 #' , ] -#' temp.gly <- glyphs(nasaLate, "long", "day", "lat", "surftemp", height=2.5) +#' temp.gly <- glyphs(nasaLate, "long", "day", "lat", "surftemp", height = 2.5) #' p_(ggplot2::ggplot(temp.gly, ggplot2::aes(gx, gy, group = gid)) + #' add_ref_lines(temp.gly, color = "grey90") + #' add_ref_boxes(temp.gly, color = "grey90") + @@ -124,7 +124,7 @@ ref_boxes <- function(data, fill = NULL) { xmax = cells[[glyph$x_major]] + glyph$width / 2, ymin = cells[[glyph$y_major]] - glyph$height / 2, ymax = cells[[glyph$y_major]] + glyph$height / 2) - if (!is.null(fill)){ + if (!is.null(fill)) { df$fill <- cells[[fill]] } df @@ -253,7 +253,7 @@ min0 <- function(x) { } #' @export #' @rdname rescale01 -rescale01 <- function(x, xlim=NULL) { +rescale01 <- function(x, xlim = NULL) { if (is.null(xlim)) { rng <- range(x, na.rm = TRUE) } else { @@ -263,7 +263,7 @@ rescale01 <- function(x, xlim=NULL) { } #' @export #' @rdname rescale01 -rescale11 <- function(x, xlim=NULL) { +rescale11 <- function(x, xlim = NULL) { 2 * rescale01(x, xlim) - 1 } @@ -274,7 +274,7 @@ rescale11 <- function(x, xlim=NULL) { #' @param size Set the line size, default is 1.5 #' @param ... other arguments passed onto [ggplot2::geom_line()] #' @export -add_ref_lines <- function(data, color = "white", size = 1.5, ...){ +add_ref_lines <- function(data, color = "white", size = 1.5, ...) { rl <- ref_lines(data) geom_path(data = rl, color = color, size = size, ...) } @@ -289,13 +289,12 @@ add_ref_lines <- function(data, color = "white", size = 1.5, ...){ #' @param ... other arguments passed onto [ggplot2::geom_rect()] #' @export add_ref_boxes <- function(data, var_fill = NULL, color = "white", size = 0.5, - fill = NA, ...){ + fill = NA, ...) { rb <- ref_boxes(data, var_fill) - if (!is.null(var_fill)){ + if (!is.null(var_fill)) { geom_rect(aes_all(names(rb)), data = rb, color = color, size = size, inherit.aes = FALSE, ...) - } - else{ + } else { geom_rect(aes_all(names(rb)), data = rb, color = color, size = size, inherit.aes = FALSE, fill = fill, ...) } diff --git a/R/ggmatrix_gtable.R b/R/ggmatrix_gtable.R index 0d663ca37..de89126fd 100644 --- a/R/ggmatrix_gtable.R +++ b/R/ggmatrix_gtable.R @@ -12,7 +12,7 @@ #' @export #' @examples #' data(tips, package = "reshape") -#' pm <- ggpairs(tips, c(1,3,2), mapping = ggplot2::aes_string(color = "sex")) +#' pm <- ggpairs(tips, c(1, 3, 2), mapping = ggplot2::aes_string(color = "sex")) #' ggmatrix_gtable(pm) ggmatrix_gtable <- function( pm, diff --git a/R/ggmatrix_gtable_helpers.R b/R/ggmatrix_gtable_helpers.R index 71036466f..c6177aa38 100644 --- a/R/ggmatrix_gtable_helpers.R +++ b/R/ggmatrix_gtable_helpers.R @@ -9,7 +9,7 @@ plot_gtable <- function(p) { # axis_size_bottom(p) # axis_size_left(g) # axis_size_bottom(g) -axis_list <- (function(){ +axis_list <- (function() { axis_label_size_wrapper <- function(fn, filter_val, select_val, unitTo, valueOnly) { function(pg) { pg_axis <- gtable::gtable_filter(pg, filter_val) diff --git a/R/ggmatrix_legend.R b/R/ggmatrix_legend.R index 824820053..2c925f9ac 100644 --- a/R/ggmatrix_legend.R +++ b/R/ggmatrix_legend.R @@ -98,7 +98,7 @@ print.legend_guide_box <- function(x, ..., plotNew = FALSE) { #' # Place a legend in a specific location #' pm <- ggpairs(iris, 1:2, mapping = ggplot2::aes(color = Species)) #' # Make the legend -#' pm[1,2] <- points_legend(iris, ggplot2::aes(Sepal.Width, Sepal.Length, color = Species)) +#' pm[1, 2] <- points_legend(iris, ggplot2::aes(Sepal.Width, Sepal.Length, color = Species)) #' p_(pm) gglegend <- function(fn) { diff --git a/R/ggmatrix_make_plot.R b/R/ggmatrix_make_plot.R index 7149eeb9c..339d7a91c 100644 --- a/R/ggmatrix_make_plot.R +++ b/R/ggmatrix_make_plot.R @@ -16,7 +16,7 @@ make_label_plot <- function(types, sectionAes, label) { -ggmatrix_plot_list <- (function(){ +ggmatrix_plot_list <- (function() { make_diag_plot_wrapper <- function(sub_type_val) { plot_fn <- make_plot_wrapper(sub_type_val) diff --git a/R/ggmatrix_print.R b/R/ggmatrix_print.R index ad211a3c1..96350c552 100644 --- a/R/ggmatrix_print.R +++ b/R/ggmatrix_print.R @@ -16,9 +16,9 @@ ggplot2_set_last_plot <- utils::getFromNamespace("set_last_plot", "ggplot2") #' @export #' @examples #' data(tips, package = "reshape") -#' pMat <- ggpairs(tips, c(1,3,2), mapping = ggplot2::aes_string(color = "sex")) +#' pMat <- ggpairs(tips, c(1, 3, 2), mapping = ggplot2::aes_string(color = "sex")) #' pMat # calls print(pMat), which calls print.ggmatrix(pMat) -print.ggmatrix <- function (x, newpage = is.null(vp), vp = NULL, ...) { +print.ggmatrix <- function(x, newpage = is.null(vp), vp = NULL, ...) { if (newpage) { grid.newpage() } @@ -54,6 +54,6 @@ print.ggmatrix <- function (x, newpage = is.null(vp), vp = NULL, ...) { #' GGally:::is_blank_plot(ggally_blank()) #' GGally:::is_blank_plot(ggally_points(mtcars, ggplot2::aes_string(x = "disp", y = "hp"))) #' -is_blank_plot <- function(p){ +is_blank_plot <- function(p) { is.null(p) || identical(p, "blank") || inherits(p, "ggmatrix_blank") } diff --git a/R/ggmatrix_progress.R b/R/ggmatrix_progress.R index 69ac70261..0287784eb 100644 --- a/R/ggmatrix_progress.R +++ b/R/ggmatrix_progress.R @@ -13,7 +13,7 @@ #' pm <- ggpairs(iris, 1:2, progress = ggmatrix_progress(clear = FALSE)) #' p_(pm) ggmatrix_progress <- function( - format = " plot: [:plot_i,:plot_j] [:bar]:percent est::eta ", + format = " plot: [:plot_i, :plot_j] [:bar]:percent est::eta ", clear = TRUE, show_after = 0, ... diff --git a/R/ggnet.R b/R/ggnet.R index 20f5e1168..43ea7b759 100644 --- a/R/ggnet.R +++ b/R/ggnet.R @@ -146,8 +146,8 @@ if (getRversion() >= "2.15.1") { #' ndyads <- x * (x - 1) #' density <- x / ndyads #' m <- matrix(0, nrow = x, ncol = x) -#' dimnames(m) <- list(letters[ 1:x ], letters[ 1:x ]) -#' m[ row(m) != col(m) ] <- runif(ndyads) < density +#' dimnames(m) <- list(letters[1:x], letters[1:x]) +#' m[row(m) != col(m)] <- runif(ndyads) < density #' m #' #' # random undirected network @@ -157,7 +157,7 @@ if (getRversion() >= "2.15.1") { #' ggnet(n, label = TRUE, alpha = 1, color = "white", segment.color = "black") #' #' # random groups -#' g <- sample(letters[ 1:3 ], 10, replace = TRUE) +#' g <- sample(letters[1:3], 10, replace = TRUE) #' g #' #' # color palette @@ -205,7 +205,7 @@ ggnet <- function( top8.nodes = FALSE, trim.labels = FALSE, ... -){ +) { # -- packages ---------------------------------------------------------------- @@ -339,14 +339,14 @@ ggnet <- function( if (!is.numeric(arrow.size) || arrow.size < 0) { stop("incorrect arrow.size value") - } else if (arrow.size > 0 & is_dir == "graph") { + } else if (arrow.size > 0 && is_dir == "graph") { warning("network is undirected; arrow.size ignored") arrow.size = 0 } if (!is.numeric(arrow.gap) || arrow.gap < 0 || arrow.gap > 1) { stop("incorrect arrow.gap value") - } else if (arrow.gap > 0 & is_dir == "graph") { + } else if (arrow.gap > 0 && is_dir == "graph") { warning("network is undirected; arrow.gap ignored") arrow.gap = 0 } @@ -385,7 +385,7 @@ ggnet <- function( if ("package:igraph" %in% search()) { y = ifelse(is_dir == "digraph", "directed", "undirected") - z = c("indegree" = "in", "outdegree" = "out", "degree" = "all", "freeman" = "all")[ x ] + z = c("indegree" = "in", "outdegree" = "out", "degree" = "all", "freeman" = "all")[x] data$weight = igraph::degree(igraph::graph.adjacency(as.matrix(net), mode = y), mode = z) } else { @@ -415,7 +415,7 @@ ggnet <- function( if (length(x) > 0) { - data = data[ -x, ] + data = data[-x, ] network::delete.vertices(net, x) if (!nrow(data)) { @@ -440,7 +440,7 @@ ggnet <- function( if (length(x) > 0) { - data = data[ -x, ] + data = data[-x, ] network::delete.vertices(net, x) if (!nrow(data)) { @@ -488,7 +488,7 @@ ggnet <- function( set_name(weight.method, weight.legend), max_size = size, breaks = sort(unique(as.integer(data$weight))), - labels = levels(data$weight)[ sort(unique(as.integer(data$weight))) ] + labels = levels(data$weight)[sort(unique(as.integer(data$weight)))] ) data$weight = as.integer(data$weight) @@ -528,7 +528,7 @@ ggnet <- function( if (isTRUE(l)) { l = data$label - } else if (length(l) > 1 & length(l) == n_nodes) { + } else if (length(l) > 1 && length(l) == n_nodes) { data$label = l } else if (length(l) == 1 && l %in% v_attr) { l = get_v(net, l) @@ -568,15 +568,15 @@ ggnet <- function( } - xy$x = scale(xy$x, min(xy$x), diff(range(xy$x)))[,1] - xy$y = scale(xy$y, min(xy$y), diff(range(xy$y)))[,1] + xy$x = scale(xy$x, min(xy$x), diff(range(xy$x)))[, 1] + xy$y = scale(xy$y, min(xy$y), diff(range(xy$y)))[, 1] data = cbind(data, xy) # -- edge list --------------------------------------------------------------- edges = network::as.matrix.network.edgelist(net) - edges = data.frame(xy[ edges[, 1], ], xy[ edges[, 2], ]) + edges = data.frame(xy[edges[, 1], ], xy[edges[, 2], ]) names(edges) = c("X1", "Y1", "X2", "Y2") # -- edge labels ------------------------------------------------------------- @@ -690,7 +690,7 @@ ggnet <- function( x = label.trim - if (length(x) > 1 || (!is.logical(x) & !is.numeric(x) & !is.function(x))) { + if (length(x) > 1 || (!is.logical(x) && !is.numeric(x) && !is.function(x))) { stop("incorrect label.trim value") } else if (is.numeric(x) && x > 0) { l = substr(l, 1, x) diff --git a/R/ggnet2.R b/R/ggnet2.R index d934100fb..5f187f13c 100644 --- a/R/ggnet2.R +++ b/R/ggnet2.R @@ -209,8 +209,8 @@ if (getRversion() >= "2.15.1") { #' ndyads <- x * (x - 1) #' density <- x / ndyads #' m <- matrix(0, nrow = x, ncol = x) -#' dimnames(m) <- list(letters[ 1:x ], letters[ 1:x ]) -#' m[ row(m) != col(m) ] <- runif(ndyads) < density +#' dimnames(m) <- list(letters[1:x], letters[1:x]) +#' m[row(m) != col(m)] <- runif(ndyads) < density #' m #' #' # random undirected network @@ -302,7 +302,7 @@ ggnet2 <- function( legend.size = 9, legend.position = "right", ... -){ +) { # -- packages ---------------------------------------------------------------- @@ -422,14 +422,14 @@ ggnet2 <- function( if (!is.numeric(arrow.size) || arrow.size < 0) { stop("incorrect arrow.size value") - } else if (arrow.size > 0 & is_dir == "graph") { + } else if (arrow.size > 0 && is_dir == "graph") { warning("network is undirected; arrow.size ignored") arrow.size = 0 } if (!is.numeric(arrow.gap) || arrow.gap < 0 || arrow.gap > 1) { stop("incorrect arrow.gap value") - } else if (arrow.gap > 0 & is_dir == "graph") { + } else if (arrow.gap > 0 && is_dir == "graph") { warning("network is undirected; arrow.gap ignored") arrow.gap = 0 } @@ -480,7 +480,7 @@ ggnet2 <- function( if (length(x) > 0) { - data = data[ -x, ] + data = data[-x, ] network::delete.vertices(net, x) if (!nrow(data)) { @@ -504,7 +504,7 @@ ggnet2 <- function( if ("package:igraph" %in% search()) { y = ifelse(is_dir == "digraph", "directed", "undirected") - z = c("indegree" = "in", "outdegree" = "out", "degree" = "all", "freeman" = "all")[ x ] + z = c("indegree" = "in", "outdegree" = "out", "degree" = "all", "freeman" = "all")[x] data$size = igraph::degree(igraph::graph.adjacency(as.matrix(net), mode = y), mode = z) } else { @@ -530,7 +530,7 @@ ggnet2 <- function( if (length(x) > 0) { - data = data[ -x, ] + data = data[-x, ] network::delete.vertices(net, x) if (!nrow(data)) { @@ -557,7 +557,7 @@ ggnet2 <- function( if (length(x) > 0) { - data = data[ -x, ] + data = data[-x, ] network::delete.vertices(net, x) if (!nrow(data)) { @@ -611,7 +611,7 @@ ggnet2 <- function( if (!is.null(names(x))) { - y = unique(na.omit(data$alpha[ !data$alpha %in% names(x) ])) + y = unique(na.omit(data$alpha[!data$alpha %in% names(x)])) if (length(y) > 0) { stop(paste("no alpha.palette value for", paste0(y, collapse = ", "))) @@ -643,7 +643,7 @@ ggnet2 <- function( data$color = factor(data$color) n_groups = length(levels(data$color)) - n_colors = RColorBrewer::brewer.pal.info[ x, "maxcolors" ] + n_colors = RColorBrewer::brewer.pal.info[x, "maxcolors"] if (n_groups > n_colors) { @@ -654,14 +654,14 @@ ggnet2 <- function( n_groups = 3 } - x = RColorBrewer::brewer.pal(n_groups, x)[ 1:length(levels(data$color)) ] + x = RColorBrewer::brewer.pal(n_groups, x)[1:length(levels(data$color))] names(x) = levels(data$color) } if (!is.null(names(x))) { - y = unique(na.omit(data$color[ !data$color %in% names(x) ])) + y = unique(na.omit(data$color[!data$color %in% names(x)])) if (length(y) > 0) { stop(paste("no color.palette value for", paste0(y, collapse = ", "))) @@ -690,7 +690,7 @@ ggnet2 <- function( if (!is.null(names(x))) { - y = unique(na.omit(data$shape[ !data$shape %in% names(x) ])) + y = unique(na.omit(data$shape[!data$shape %in% names(x)])) if (length(y) > 0) { stop(paste("no shape.palette value for", paste0(y, collapse = ", "))) @@ -718,7 +718,7 @@ ggnet2 <- function( if (!is.null(names(x))) { - y = unique(na.omit(data$size[ !data$size %in% names(x) ])) + y = unique(na.omit(data$size[!data$size %in% names(x)])) if (length(y) > 0) { stop(paste("no size.palette value for", paste0(y, collapse = ", "))) @@ -740,7 +740,7 @@ ggnet2 <- function( if (isTRUE(l)) { l = data$label - } else if (length(l) > 1 & length(l) == n_nodes) { + } else if (length(l) > 1 && length(l) == n_nodes) { data$label = l } else if (length(l) == 1 && l %in% v_attr) { l = get_v(net, l) @@ -780,8 +780,8 @@ ggnet2 <- function( } - xy$x = scale(xy$x, min(xy$x), diff(range(xy$x)))[,1] - xy$y = scale(xy$y, min(xy$y), diff(range(xy$y)))[,1] + xy$x = scale(xy$x, min(xy$x), diff(range(xy$x)))[, 1] + xy$y = scale(xy$y, min(xy$y), diff(range(xy$y)))[, 1] data = cbind(data, xy) @@ -792,15 +792,15 @@ ggnet2 <- function( if (edge.color[1] == "color" && length(edge.color) == 2) { # edge colors from node source and target - edge.color = ifelse(data$color[ edges[, 1]] == data$color[ edges[, 2]], - as.character(data$color[ edges[, 1]]), edge.color[2]) + edge.color = ifelse(data$color[edges[, 1]] == data$color[edges[, 2]], + as.character(data$color[edges[, 1]]), edge.color[2]) if (!is.null(names(color.palette))) { x = which(edge.color %in% names(color.palette)) - edge.color[x] = color.palette[ edge.color[x] ] + edge.color[x] = color.palette[edge.color[x]] } - edge.color[ is.na(edge.color) ] = edge.color[2] + edge.color[is.na(edge.color)] = edge.color[2] } @@ -812,7 +812,7 @@ ggnet2 <- function( # -- edge list --------------------------------------------------------------- - edges = data.frame(xy[ edges[, 1], ], xy[ edges[, 2], ]) + edges = data.frame(xy[edges[, 1], ], xy[edges[, 2], ]) names(edges) = c("X1", "Y1", "X2", "Y2") # -- edge labels, colors and sizes ------------------------------------------- @@ -999,7 +999,7 @@ ggnet2 <- function( # -- legend: size ------------------------------------------------------------ - x = x[ names(x) != "size" ] + x = x[names(x) != "size"] if (is.numeric(data$size)) { @@ -1053,7 +1053,7 @@ ggnet2 <- function( x = label.trim - if (length(x) > 1 || (!is.logical(x) & !is.numeric(x) & !is.function(x))) { + if (length(x) > 1 || (!is.logical(x) && !is.numeric(x) && !is.function(x))) { stop("incorrect label.trim value") } else if (is.numeric(x) && x > 0) { l = substr(l, 1, x) diff --git a/R/ggnetworkmap.R b/R/ggnetworkmap.R index f25309a59..ea28a3401 100644 --- a/R/ggnetworkmap.R +++ b/R/ggnetworkmap.R @@ -1,4 +1,4 @@ -if(getRversion() >= "2.15.1") { +if (getRversion() >= "2.15.1") { utils::globalVariables(c( "lon", "lat", "group", "id", "lon1", "lat1", "lon2", "lat2", @@ -66,8 +66,8 @@ if(getRversion() >= "2.15.1") { #' flights <- network(flights, directed = TRUE) #' #' # add geographic coordinates -#' flights %v% "lat" <- airports[ network.vertex.names(flights), "lat" ] -#' flights %v% "lon" <- airports[ network.vertex.names(flights), "long" ] +#' flights %v% "lat" <- airports[network.vertex.names(flights), "lat"] +#' flights %v% "lon" <- airports[network.vertex.names(flights), "long"] #' #' # drop isolated airports #' delete.vertices(flights, which(degree(flights) < 2)) @@ -145,7 +145,7 @@ if(getRversion() >= "2.15.1") { #'} #' -ggnetworkmap <- function ( +ggnetworkmap <- function( gg, net, size = 3, @@ -196,7 +196,7 @@ ggnetworkmap <- function ( if (!is.numeric(arrow.size) || arrow.size < 0) { stop("incorrect arrow.size value") - } else if (arrow.size > 0 & is_dir == "graph") { + } else if (arrow.size > 0 && is_dir == "graph") { warning("network is undirected; arrow.size ignored") arrow.size = 0 } @@ -232,7 +232,7 @@ ggnetworkmap <- function ( } gg <- ggplot() + coord_map() - plotcord <- sna::gplot.layout.fruchtermanreingold(net, list(m,layout.par = NULL)) + plotcord <- sna::gplot.layout.fruchtermanreingold(net, list(m, layout.par = NULL)) plotcord <- data.frame(plotcord) colnames(plotcord) = c("lon", "lat") } else { @@ -262,7 +262,7 @@ ggnetworkmap <- function ( ) # get node groups - if(!missing(node.group)) { + if (!missing(node.group)) { plotcord$.ngroup <- get_v(net, as.character(substitute(node.group))) if (missing(ring.group)) { point_aes$color = substitute(.ngroup) @@ -272,11 +272,11 @@ ggnetworkmap <- function ( } else if (! missing(node.color)) { point_args$color <- substitute(node.color) } else { - point_args$color <- substitute( "black") + point_args$color <- substitute("black") } # rings - if(!missing(ring.group)) { + if (!missing(ring.group)) { plotcord$.rgroup <- get_v(net, as.character(substitute(ring.group))) point_aes$color <- substitute(.rgroup) point_args$pch <- substitute(21) @@ -291,10 +291,10 @@ ggnetworkmap <- function ( # get edgelist edges <- network::as.matrix.network.edgelist(net) edges <- data.frame( - lat1 = plotcord[ edges[, 1], "lat"], - lon1 = plotcord[ edges[, 1], "lon"], - lat2 = plotcord[ edges[, 2], "lat"], - lon2 = plotcord[ edges[,2], "lon"]) + lat1 = plotcord[edges[, 1], "lat"], + lon1 = plotcord[edges[, 1], "lon"], + lat2 = plotcord[edges[, 2], "lat"], + lon2 = plotcord[edges[, 2], "lon"]) edges <- subset(na.omit(edges), (! (lat1 == lat2 & lon2 == lon2))) edge_args <- list(size = substitute(segment.size), @@ -305,7 +305,7 @@ ggnetworkmap <- function ( # -- edge arrows ------------------------------------------------------------- - if (!missing(arrow.size) & arrow.size > 0) { + if (!missing(arrow.size) && arrow.size > 0) { edge_args$arrow <- substitute(arrow( type = "closed", length = unit(arrow.size, "cm") @@ -324,12 +324,12 @@ ggnetworkmap <- function ( edges <- ddply( .data = edges, - .variables = c("lat1","lat2","lon1","lon2"), + .variables = c("lat1", "lat2", "lon1", "lon2"), .parallel = FALSE, .fun = function(x) { - p1Mat <- x[,c("lon1", "lat1")] + p1Mat <- x[, c("lon1", "lat1")] colnames(p1Mat) <- NULL - p2Mat <- x[,c("lon2", "lat2")] + p2Mat <- x[, c("lon2", "lat2")] colnames(p2Mat) <- NULL inter <- geosphere::gcIntermediate( p1 = p1Mat, @@ -399,7 +399,7 @@ ggnetworkmap <- function ( # custom weights: vertex attribute # null weighting sizer <- NULL - if(missing(weight)) { + if (missing(weight)) { point_args$size <- substitute(size) diff --git a/R/ggnostic.R b/R/ggnostic.R index 3618d40b1..44bc60722 100644 --- a/R/ggnostic.R +++ b/R/ggnostic.R @@ -94,7 +94,7 @@ beta_stars <- function(p_val) { model_beta_label <- function(model, data = broom::augment(model), lmStars = TRUE) { beta_vars <- model_beta_variables(model, data = data) - if ( (! identical(class(model), "lm")) || (!isTRUE(lmStars))) { + if ((! identical(class(model), "lm")) || (!isTRUE(lmStars))) { return(beta_vars) } @@ -166,7 +166,7 @@ ggally_nostic_line <- function( x_is_character <- is_character_column(data, mapping, "x") - if (x_is_character & isTRUE(mapColorToFill)) { + if (x_is_character && isTRUE(mapColorToFill)) { mapping <- mapping_color_to_fill(mapping) } @@ -234,7 +234,7 @@ ggally_nostic_resid <- function( formula = y ~ x ) { - if (!is.null(linePosition) & !is.null(pVal) & !is.null(sigma)) { + if (!is.null(linePosition) && !is.null(pVal) && !is.null(sigma)) { scaled_sigmas <- qnorm(pVal, lower.tail = TRUE, sd = sigma) linePosition <- c(linePosition, linePosition + scaled_sigmas) @@ -645,7 +645,7 @@ ggnostic <- function( ), combo = list( default = ggally_box_no_facet, - fitted = ggally_box_no_facet, + .fitted = ggally_box_no_facet, .se.fit = ggally_nostic_se_fit, .resid = ggally_nostic_resid, .hat = ggally_nostic_hat, diff --git a/R/ggpairs.R b/R/ggpairs.R index 9c29fe90c..0ae6eea51 100644 --- a/R/ggpairs.R +++ b/R/ggpairs.R @@ -55,7 +55,7 @@ fix_data <- function(data) { data <- fortify(data) data <- as.data.frame(data) - for (i in 1:dim(data)[2] ) { + for (i in 1:dim(data)[2]) { if (is.character(data[[i]])) { data[[i]] <- as.factor(data[[i]]) } @@ -83,7 +83,7 @@ fix_column_values <- function( colnamesData <- colnames(data) if (is.character(columns)) { - colNumValues <- lapply(columns, function(colName){ + colNumValues <- lapply(columns, function(colName) { which(colnamesData == colName) }) isFound <- as.logical(unlist(lapply(colNumValues, length))) @@ -110,7 +110,7 @@ fix_column_values <- function( "\t", columnsName, " = c(", paste(columns, collapse = ", "), ")" ) } - if (any( (columns %% 1) != 0)) { + if (any((columns %% 1) != 0)) { stop( "Make sure your numeric '", columnsName, "' values are integers.", "\n", "\t", columnsName, " = c(", paste(columns, collapse = ", "), ")" @@ -374,7 +374,7 @@ stop_if_high_cardinality <- function(data, columns, threshold) { #' rev(psych_variables), academic_variables, #' types = list(continuous = loess_with_cor), #' showStrips = FALSE, -#' legend = c(5,2) +#' legend = c(5, 2) #' ) #' suppressWarnings(p_(pm)) #' @@ -386,7 +386,7 @@ stop_if_high_cardinality <- function(data, columns, threshold) { #' rev(psych_variables), academic_variables, #' types = list(continuous = loess_with_cor), #' showStrips = FALSE, -#' legend = c(5,2) +#' legend = c(5, 2) #' ) + #' ggplot2::theme(legend.position = "bottom") #' suppressWarnings(p_(pm)) @@ -410,10 +410,10 @@ stop_if_high_cardinality <- function(data, columns, threshold) { # ); # # # make the 5th column blank, except for the legend -# pm[1,5] <- NULL -# pm[2,5] <- grab_legend(pm[2,1]) -# pm[3,5] <- NULL -# pm[4,5] <- NULL +# pm[1, 5] <- NULL +# pm[2, 5] <- grab_legend(pm[2, 1]) +# pm[3, 5] <- NULL +# pm[4, 5] <- NULL # # pm # @@ -478,8 +478,8 @@ ggduo <- function( # fix args if ( - !missing(mapping) & !is.list(mapping) & - !missing(columnsX) & missing(columnsY) + !missing(mapping) && !is.list(mapping) && + !missing(columnsX) && missing(columnsY) ) { columnsY <- columnsX columnsX <- mapping @@ -591,7 +591,7 @@ ggduo <- function( # make_small_strip <- function(plot_matrix, from_top, from_left, new_size = 7){ # up <- from_left > from_top # p <- getPlot(plot_matrix, from_top, from_left) -# if(up) +# if (up) # p <- p + opts(strip.text.x = element_text(size = new_size)) # else # p <- p + opts(strip.text.y = element_text(angle = -90, size = new_size)) @@ -662,7 +662,7 @@ ggduo <- function( #' ## Quick example, with and without colour #' data(flea) #' ggpairs(flea, columns = 2:4) -#' pm <- ggpairs(flea, columns = 2:4, ggplot2::aes(colour=species)) +#' pm <- ggpairs(flea, columns = 2:4, ggplot2::aes(colour = species)) #' p_(pm) #' # Note: colour should be categorical, else you will need to reset #' # the upper triangle to use points instead of trying to compute corr @@ -692,7 +692,7 @@ ggduo <- function( #' p_(pm) #' #' # Use sample of the diamonds data -#' data(diamonds, package="ggplot2") +#' data(diamonds, package = "ggplot2") #' diamonds.samp <- diamonds[sample(1:dim(diamonds)[1], 1000), ] #' #' # Different aesthetics for different plot sections and plot types @@ -707,10 +707,10 @@ ggduo <- function( #' #' ## Axis Label Variations #' # Only Variable Labels on the diagonal (no axis labels) -#' pm <- ggpairs(tips[, 1:3], axisLabels="internal") +#' pm <- ggpairs(tips[, 1:3], axisLabels = "internal") #' p_(pm) #' # Only Variable Labels on the outside (no axis labels) -#' pm <- ggpairs(tips[, 1:3], axisLabels="none") +#' pm <- ggpairs(tips[, 1:3], axisLabels = "none") #' p_(pm) #' #' ## Facet Label Variations @@ -734,10 +734,10 @@ ggduo <- function( #' ## Plot Insertion Example #' custom_car <- ggpairs(mtcars[, c("mpg", "wt", "cyl")], upper = "blank", title = "Custom Example") #' # ggplot example taken from example(geom_text) -#' plot <- ggplot2::ggplot(mtcars, ggplot2::aes(x=wt, y=mpg, label=rownames(mtcars))) +#' plot <- ggplot2::ggplot(mtcars, ggplot2::aes(x = wt, y = mpg, label = rownames(mtcars))) #' plot <- plot + -#' ggplot2::geom_text(ggplot2::aes(colour=factor(cyl)), size = 3) + -#' ggplot2::scale_colour_discrete(l=40) +#' ggplot2::geom_text(ggplot2::aes(colour = factor(cyl)), size = 3) + +#' ggplot2::scale_colour_discrete(l = 40) #' custom_car[1, 2] <- plot #' personal_plot <- ggally_text( #' "ggpairs allows you\nto put in your\nown plot.\nLike that one.\n <---" @@ -795,7 +795,7 @@ ggpairs <- function( progress = NULL, proportions = NULL, legends = stop("deprecated") -){ +) { warn_deprecated(!missing(legends), "legends") warn_if_args_exist(list(...)) @@ -807,7 +807,7 @@ ggpairs <- function( data <- fix_data_slim(data_, isSharedData) if ( - !missing(mapping) & !is.list(mapping) & + !missing(mapping) && !is.list(mapping) && missing(columns) ) { columns <- mapping @@ -919,7 +919,7 @@ ggpairs <- function( #' @import ggplot2 #' @rdname add_and_overwrite_aes #' @examples -#' data(diamonds, package="ggplot2") +#' data(diamonds, package = "ggplot2") #' diamonds.samp <- diamonds[sample(1:dim(diamonds)[1], 1000), ] #' pm <- ggpairs(diamonds.samp, columns = 5:7, #' mapping = ggplot2::aes(color = color), @@ -971,9 +971,9 @@ mapping_color_to_fill <- function(current) { current$colour <- NULL } - # if(!is.null(mapping$colour) && !is.null(mapping$fill)) { + # if (!is.null(mapping$colour) && !is.null(mapping$fill)) { # # do nothing - # } else if(!is.null(mapping$colour)) { + # } else if (!is.null(mapping$colour)) { # } current } @@ -1020,7 +1020,7 @@ check_and_set_ggpairs_defaults <- function( obj <- set_to_blank_list_if_blank( obj, - combo = ! isDiag & ! isDuo, + combo = ! isDiag && ! isDuo, blank = blankVal, isDuo = isDuo ) diff --git a/R/ggpairs_add.R b/R/ggpairs_add.R index dd8602d88..94a9653d1 100644 --- a/R/ggpairs_add.R +++ b/R/ggpairs_add.R @@ -224,13 +224,13 @@ add_to_ggmatrix <- function( #' ggmatrix_location(pm, cols = 2) #' #' # row and column combinations -#' ggmatrix_location(pm, rows = c(1,2), cols = c(1,3)) +#' ggmatrix_location(pm, rows = c(1, 2), cols = c(1, 3)) #' #' # matrix locations #' mat <- matrix(TRUE, ncol = 3, nrow = 3) -#' mat[1,1] <- FALSE +#' mat[1, 1] <- FALSE #' locs <- ggmatrix_location(pm, location = mat) -#' ## does not contain the 1,1 cell +#' ## does not contain the 1, 1 cell #' locs #' #' # Use the output of a prior ggmatrix_location @@ -294,7 +294,7 @@ ggmatrix_location <- function( tmp_locs <- data.frame(row = numeric(0), col = numeric(0)) for (i in seq_len(nrow(location))) { for (j in seq_len(ncol(location))) { - val <- location[i,j] + val <- location[i, j] if (val) { tmp_locs[nrow(tmp_locs) + 1, ] <- list(row = i, col = j) } diff --git a/R/ggpairs_getput.R b/R/ggpairs_getput.R index 434a65be7..4b071c62d 100644 --- a/R/ggpairs_getput.R +++ b/R/ggpairs_getput.R @@ -16,10 +16,10 @@ #' #' custom_car <- ggpairs(mtcars[, c("mpg", "wt", "cyl")], upper = "blank", title = "Custom Example") #' # ggplot example taken from example(geom_text) -#' plot <- ggplot2::ggplot(mtcars, ggplot2::aes(x=wt, y=mpg, label=rownames(mtcars))) +#' plot <- ggplot2::ggplot(mtcars, ggplot2::aes(x = wt, y = mpg, label = rownames(mtcars))) #' plot <- plot + -#' ggplot2::geom_text(ggplot2::aes(colour=factor(cyl)), size = 3) + -#' ggplot2::scale_colour_discrete(l=40) +#' ggplot2::geom_text(ggplot2::aes(colour = factor(cyl)), size = 3) + +#' ggplot2::scale_colour_discrete(l = 40) #' custom_car[1, 2] <- plot #' personal_plot <- ggally_text( #' "ggpairs allows you\nto put in your\nown plot.\nLike that one.\n <---" @@ -28,11 +28,11 @@ #' # custom_car #' #' # remove plots after creating a plot matrix -#' custom_car[2,1] <- NULL -#' custom_car[3,1] <- "blank" # the same as storing null -#' custom_car[3,2] <- NULL +#' custom_car[2, 1] <- NULL +#' custom_car[3, 1] <- "blank" # the same as storing null +#' custom_car[3, 2] <- NULL #' p_(custom_car) -putPlot <- function(pm, value, i, j){ +putPlot <- function(pm, value, i, j) { pos <- get_pos(pm, i, j) if (is.null(value)) { pm$plots[[pos]] <- make_ggmatrix_plot_obj(wrap("blank", funcArgName = "ggally_blank")) @@ -68,7 +68,7 @@ putPlot <- function(pm, value, i, j){ #' data(tips, package = "reshape") #' plotMatrix2 <- ggpairs(tips[, 3:2], upper = list(combo = "denstrip")) #' p_(plotMatrix2[1, 2]) -getPlot <- function(pm, i, j){ +getPlot <- function(pm, i, j) { if (FALSE) { cat("i: ", i, " j: ", j, "\n") } @@ -131,10 +131,10 @@ get_pos_rev <- function(pm, pos) { check_i_j <- function(pm, i, j) { - if ( (length(i) > 1) || (mode(i) != "numeric")) { + if ((length(i) > 1) || (mode(i) != "numeric")) { stop("'i' may only be a single numeric value") } - if ( (length(j) > 1) || (mode(j) != "numeric")) { + if ((length(j) > 1) || (mode(j) != "numeric")) { stop("'j' may only be a single numeric value") } diff --git a/R/ggparcoord.R b/R/ggparcoord.R index 6a2fbcb1a..2e96514e1 100644 --- a/R/ggparcoord.R +++ b/R/ggparcoord.R @@ -85,7 +85,7 @@ if (getRversion() >= "2.15.1") { #' p_ <- GGally::print_if_interactive #' #' # use sample of the diamonds data for illustrative purposes -#' data(diamonds, package="ggplot2") +#' data(diamonds, package = "ggplot2") #' diamonds.samp <- diamonds[sample(1:dim(diamonds)[1], 100), ] #' #' # basic parallel coordinate plot, using default settings @@ -110,7 +110,7 @@ if (getRversion() >= "2.15.1") { #' # basic parallel coord plot of the msleep data, using 'random' imputation and #' # coloring by diet (can also use variable names in the columns and groupColumn #' # arguments) -#' data(msleep, package="ggplot2") +#' data(msleep, package = "ggplot2") #' p <- ggparcoord(data = msleep, columns = 6:11, groupColumn = "vore", missing = #' "random", scale = "uniminmax") #' p_(p) @@ -179,7 +179,7 @@ ggparcoord <- function( stop("can't use the 'order' methods anyClass or allClass without specifying groupColumn") } } else if ( - !( (length(groupColumn) == 1) && (is.numeric(groupColumn) || is.character(groupColumn))) + !((length(groupColumn) == 1) && (is.numeric(groupColumn) || is.character(groupColumn))) ) { stop("invalid value for 'groupColumn'; must be a single numeric or character index") } @@ -210,7 +210,7 @@ ggparcoord <- function( "skewness", "allClass", "anyClass", "Outlying", "Skewed", "Clumpy", "Sparse", "Striated", "Convex", "Skinny", "Stringy", "Monotonic" )) - )) ) { + ))) { stop(str_c( "invalid value for 'order'; must either be a vector of column indices or one of ", "'skewness', 'allClass', 'anyClass', 'Outlying', 'Skewed', 'Clumpy', 'Sparse', 'Striated', ", @@ -313,7 +313,7 @@ ggparcoord <- function( data$anyMissing <- apply(is.na(data[, columns]), 1, any) columnsPlusTwo <- c(columns, p) - inner_rescaler_default <- function (x, type = "sd", ...) { + inner_rescaler_default <- function(x, type = "sd", ...) { # copied directly from reshape because of import difficulties :-( # rescaler.default switch(type, @@ -332,7 +332,7 @@ ggparcoord <- function( if (any(continuous)) { if (type %in% c("sd", "robust", "range")) { # indicating columns containing only one single value - singleVal <- sapply(x, function(col){ + singleVal <- sapply(x, function(col) { if (length(unique(col)) == 1) { TRUE } else { @@ -386,8 +386,7 @@ ggparcoord <- function( } data <- data[dataCompleteCases, ] - } - else if (tolower(missing) %in% c("mean", "median", "min10", "random")) { + } else if (tolower(missing) %in% c("mean", "median", "min10", "random")) { missingFns <- list( mean = function(x) { mean(x, na.rm = TRUE) @@ -395,7 +394,7 @@ ggparcoord <- function( median = function(x) { median(x, na.rm = TRUE) }, - min10 = function(x){ + min10 = function(x) { 0.9 * min(x, na.rm = TRUE) }, random = function(x) { @@ -406,7 +405,7 @@ ggparcoord <- function( ) missing_fn <- missingFns[[tolower(missing)]] data[columns] <- apply(data[columns], 2, function(x) { - if (any(is.na(x))){ + if (any(is.na(x))) { x[is.na(x)] <- missing_fn(x) } return(x) @@ -419,7 +418,7 @@ ggparcoord <- function( # in case the observation to be centered on has missing values if (tolower(scale) == "centerobs") { data[columnsPlusTwo] <- inner_rescaler(data[columnsPlusTwo], type = "range") - data[columns] <- apply(data[columns], 2, function(x){ + data[columns] <- apply(data[columns], 2, function(x) { x <- x - x[centerObsID] }) } @@ -440,30 +439,27 @@ ggparcoord <- function( meltIDVars <- union(meltIDVars, alphaLines) } - # if(is.list(mapping)) { + # if (is.list(mapping)) { # mappingNames <- names(mapping) # } data.m <- melt(data, id.vars = meltIDVars, measure.vars = columns) ### Ordering ### - if (length(order) > 1 & is.numeric(order)) { + if (length(order) > 1 && is.numeric(order)) { data.m$variable <- factor(data.m$variable, levels = names(saveData)[order]) - } - else if (order %in% c("Outlying", "Skewed", "Clumpy", "Sparse", "Striated", "Convex", "Skinny", + } else if (order %in% c("Outlying", "Skewed", "Clumpy", "Sparse", "Striated", "Convex", "Skinny", "Stringy", "Monotonic")) { require_namespaces("scagnostics") scag <- scagnostics::scagnostics(saveData2) data.m$variable <- factor(data.m$variable, levels = scag_order(scag, names(saveData2), order)) - } - else if (tolower(order) == "skewness") { + } else if (tolower(order) == "skewness") { abs.skew <- abs(apply(saveData2, 2, skewness)) data.m$variable <- factor( data.m$variable, levels = names(abs.skew)[order(abs.skew, decreasing = TRUE)] ) - } - else if (tolower(order) == "allclass") { + } else if (tolower(order) == "allclass") { f.stats <- rep(NA, length(columns)) names(f.stats) <- names(saveData2[columns]) for (i in 1:length(columns)) { @@ -473,8 +469,7 @@ ggparcoord <- function( data.m$variable, levels = names(f.stats)[order(f.stats, decreasing = TRUE)] ) - } - else if (tolower(order) == "anyclass") { + } else if (tolower(order) == "anyclass") { axis.order <- singleClassOrder(groupVar, saveData2) data.m$variable <- factor(data.m$variable, levels = axis.order) } @@ -697,7 +692,7 @@ scag_order <- function(scag, vars, measure) { #' @return character vector of names of axisVars ordered such that the first #' variable has the most separation between one of the classes and the rest, and #' the last variable has the least (as measured by F-statistics from an ANOVA) -singleClassOrder <- function(classVar, axisVars, specClass=NULL) { +singleClassOrder <- function(classVar, axisVars, specClass = NULL) { if (!is.null(specClass)) { # for when user is interested in ordering by variation between one class and # the rest...will add this later @@ -728,6 +723,6 @@ skewness <- function(x) { x <- x[!is.na(x)] xbar <- mean(x) n <- length(x) - skewness <- (1 / n) * sum( (x - xbar) ^ 3) / ( (1 / n) * sum( (x - xbar) ^ 2)) ^ (3 / 2) + skewness <- (1 / n) * sum((x - xbar)^3) / ((1 / n) * sum((x - xbar)^2))^(3 / 2) return(skewness) } diff --git a/R/ggscatmat.R b/R/ggscatmat.R index 2f52741d9..d4b0004c4 100644 --- a/R/ggscatmat.R +++ b/R/ggscatmat.R @@ -14,10 +14,10 @@ if (getRversion() >= "2.15.1") { #' @author Mengjia Ni, Di Cook #' @examples #' data(flea) -#' head(lowertriangle(flea, columns= 2:4)) +#' head(lowertriangle(flea, columns = 2:4)) #' head(lowertriangle(flea)) -#' head(lowertriangle(flea, color="species")) -lowertriangle <- function(data, columns=1:ncol(data), color=NULL) { +#' head(lowertriangle(flea, color = "species")) +lowertriangle <- function(data, columns = 1:ncol(data), color = NULL) { # why do we need to ocheck this again? # data <- upgrade_scatmat_data(data) data.choose <- data[columns] @@ -25,18 +25,20 @@ lowertriangle <- function(data, columns=1:ncol(data), color=NULL) { factor <- data[sapply(data, is.factor)] p <- ncol(dn) q <- nrow(dn) - newdata <- as.data.frame(matrix(NA, nrow = q*p*p, ncol = 6+ncol(factor)), stringsAsFactors = FALSE) - newdata[5:6] <- as.data.frame(matrix("", nrow = q*p*p, ncol = 2), stringsAsFactors = FALSE) + newdata <- as.data.frame(matrix(NA, nrow = q * p * p, ncol = 6 + ncol(factor)), stringsAsFactors = FALSE) + newdata[5:6] <- as.data.frame(matrix("", nrow = q * p * p, ncol = 2), stringsAsFactors = FALSE) - r <-1 + r <- 1 for (i in 1:p) { for (j in 1:p) { - newdata[r:(r+q-1), 1:6] <- cbind(dn[[i]], dn[[j]], i, j, colnames(dn)[i], colnames(dn)[j]) - r <- r+q + newdata[r:(r + q - 1), 1:6] <- cbind(dn[[i]], dn[[j]], i, j, colnames(dn)[i], colnames(dn)[j]) + r <- r + q } } - if (ncol(newdata) > 6){newdata[7:ncol(newdata)] <- factor} + if (ncol(newdata) > 6) { + newdata[7:ncol(newdata)] <- factor + } colnames(newdata) <- c("xvalue", "yvalue", "xslot", "yslot", "xlab", "ylab", colnames(factor)) rp <- data.frame(newdata) @@ -50,7 +52,7 @@ lowertriangle <- function(data, columns=1:ncol(data), color=NULL) { rp$xlab <- factor(rp$xlab, levels = unique(rp$xlab)) rp$ylab <- factor(rp$ylab, levels = unique(rp$ylab)) - if (is.null(color)){ + if (is.null(color)) { rp.new <- rp[1:6] } else { colorcolumn <- rp[[which(colnames(rp) == color)]] @@ -72,10 +74,10 @@ lowertriangle <- function(data, columns=1:ncol(data), color=NULL) { #' @importFrom stats cor #' @examples #' data(flea) -#' head(uppertriangle(flea, columns=2:4)) +#' head(uppertriangle(flea, columns = 2:4)) #' head(uppertriangle(flea)) -#' head(uppertriangle(flea, color="species")) -uppertriangle <- function(data, columns=1:ncol(data), color=NULL, corMethod = "pearson") { +#' head(uppertriangle(flea, color = "species")) +uppertriangle <- function(data, columns = 1:ncol(data), color = NULL, corMethod = "pearson") { # data <- upgrade_scatmat_data(data) data.choose <- data[columns] # why do we need to ocheck this again? @@ -107,17 +109,17 @@ uppertriangle <- function(data, columns=1:ncol(data), color=NULL, corMethod = "p rp$xvalue <- suppressWarnings(as.numeric(as.character(rp$xvalue))) rp$yvalue <- suppressWarnings(as.numeric(as.character(rp$yvalue))) - if (is.null(color)){ + if (is.null(color)) { rp.new <- rp[1:8] - }else{ + } else { colorcolumn <- rp[[which(colnames(rp) == color)]] rp.new <- cbind(rp[1:8], colorcolumn) } a <- rp.new b <- subset(a, (a$yvalue != "NA") & (a$xvalue != "NA")) - b$xlab <- factor(b$xlab, levels=unique(b$xlab)) - b$ylab <- factor(b$ylab, levels=unique(b$ylab)) - if (is.null(color)){ + b$xlab <- factor(b$xlab, levels = unique(b$xlab)) + b$ylab <- factor(b$ylab, levels = unique(b$ylab)) + if (is.null(color)) { data.cor <- ddply( b, .(xlab, ylab), function(subsetDt) { @@ -152,7 +154,7 @@ uppertriangle <- function(data, columns=1:ncol(data), color=NULL, corMethod = "p ) return(data.cor) - }else{ + } else { c <- b data.cor1 <- ddply( c, .(ylab, xlab, colorcolumn), @@ -193,7 +195,7 @@ uppertriangle <- function(data, columns=1:ncol(data), color=NULL, corMethod = "p range = max(yvalue) - min(yvalue)) df <- data.frame() for (i in 1:nrow(position)) { - for (j in 1:n){ + for (j in 1:n) { row <- position[i, ] df <- rbind(df, cbind(row[, 3], (row[, 4] + row[, 6] * j / (n + 1)))) } @@ -220,9 +222,9 @@ uppertriangle <- function(data, columns=1:ncol(data), color=NULL, corMethod = "p #' #' data(flea) #' -#' p_(scatmat(flea, columns=2:4)) -#' p_(scatmat(flea, columns= 2:4, color="species")) -scatmat <- function(data, columns=1:ncol(data), color=NULL, alpha=1) { +#' p_(scatmat(flea, columns = 2:4)) +#' p_(scatmat(flea, columns= 2:4, color = "species")) +scatmat <- function(data, columns = 1:ncol(data), color = NULL, alpha = 1) { # data <- upgrade_scatmat_data(data) data.choose <- data[columns] dn <- data.choose[sapply(data.choose, is.numeric)] @@ -308,7 +310,7 @@ scatmat <- function(data, columns=1:ncol(data), color=NULL, alpha=1) { #' #' p_(ggscatmat(flea, columns = 2:4)) #' p_(ggscatmat(flea, columns = 2:4, color = "species")) -ggscatmat <- function(data, columns = 1:ncol(data), color = NULL, alpha = 1, corMethod = "pearson"){ +ggscatmat <- function(data, columns = 1:ncol(data), color = NULL, alpha = 1, corMethod = "pearson") { ## if 'color' is not a factor, mold it into one if (!is.null(color)) { if (is.null(data[[color]])) { @@ -324,21 +326,23 @@ ggscatmat <- function(data, columns = 1:ncol(data), color = NULL, alpha = 1, cor if (ncol(dn) == 0) { stop("All of your variables are factors. Need numeric variables to make scatterplot matrix.") } - if (ncol(dn) < 2){ - stop ("Not enough numeric variables to make a scatter plot matrix") + if (ncol(dn) < 2) { + stop("Not enough numeric variables to make a scatter plot matrix") } a <- uppertriangle(data, columns = columns, color = color, corMethod = corMethod) - if (is.null(color)){ + if (is.null(color)) { plot <- scatmat(data, columns = columns, alpha = alpha) + geom_text(data = a, aes_string(label = "r"), colour = "black") } else { plot <- scatmat(data, columns = columns, color = color, alpha = alpha) + geom_text(data = a, aes_string(label = "r", color = "colorcolumn")) + labs(color = color) } - is.factor.or.character <- function(x) {is.factor(x)|is.character(x)} + is.factor.or.character <- function(x) { + is.factor(x) | is.character(x) + } factor <- data.choose[sapply(data.choose, is.factor.or.character)] - if (ncol(factor) == 0){ + if (ncol(factor) == 0) { return(plot) } else { warning("Factor variables are omitted in plot") diff --git a/R/ggsurv.R b/R/ggsurv.R index 7d41ba9aa..d55e3c585 100644 --- a/R/ggsurv.R +++ b/R/ggsurv.R @@ -1,4 +1,4 @@ -if(getRversion() >= "2.15.1") { +if (getRversion() >= "2.15.1") { utils::globalVariables(c("cens", "surv", "up", "low")) } @@ -40,7 +40,7 @@ if(getRversion() >= "2.15.1") { #' p_ <- GGally::print_if_interactive #' #' if (require(survival) && require(scales)) { -#' data(lung, package = "survival") +#' lung <- survival::lung #' sf.lung <- survival::survfit(Surv(time, status) ~ 1, data = lung) #' p_(ggsurv(sf.lung)) #' @@ -54,7 +54,7 @@ if(getRversion() >= "2.15.1") { #' ggplot2::guides(linetype = "none") + #' ggplot2::scale_colour_discrete( #' name = 'Sex', -#' breaks = c(1,2), +#' breaks = c(1, 2), #' labels = c('Male', 'Female') #' )) #' @@ -68,7 +68,7 @@ if(getRversion() >= "2.15.1") { #' p_(pl.sex2 + labs(color = "New Title", linetype = "New Title")) #' #' # We can still adjust the plot after fitting -#' data(kidney, package = "survival") +#' kidney <- survival::kidney #' sf.kid <- survival::survfit(Surv(time, status) ~ disease, data = kidney) #' pl.kid <- ggsurv(sf.kid, plot.cens = FALSE) #' p_(pl.kid) @@ -111,7 +111,7 @@ ggsurv <- function( ylab = 'Survival', main = '', order.legend = TRUE -){ +) { require_namespaces(c("survival", "scales")) @@ -119,7 +119,7 @@ ggsurv <- function( stopifnot(length(surv.col) == 1 | length(surv.col) == strata) stopifnot(length(lty.est) == 1 | length(lty.est) == strata) - if(strata == 1) { + if (strata == 1) { fn <- ggsurv_s } else { fn <- ggsurv_m @@ -153,7 +153,7 @@ ggsurv_s <- function( main = '', strata = 1, order.legend = TRUE -){ +) { dat <- data.frame( time = c(0, s$time), @@ -172,14 +172,14 @@ ggsurv_s <- function( ylab(ylab) + ggtitle(main) - if(identical(CI, TRUE) | identical(CI, 'def')) { + if (identical(CI, TRUE) | identical(CI, 'def')) { pl <- pl + geom_step(aes(y = up), color = col, lty = lty.ci, size = size.ci) + geom_step(aes(y = low), color = col, lty = lty.ci, size = size.ci) } - if (identical(plot.cens, TRUE) ) { - if (nrow(dat.cens) == 0){ + if (identical(plot.cens, TRUE)) { + if (nrow(dat.cens) == 0) { stop('There are no censored observations') } col <- ifelse(cens.col == 'gg.def', 'red', cens.col) @@ -193,7 +193,7 @@ ggsurv_s <- function( ) } - if(back.white == TRUE) { + if (back.white == TRUE) { pl <- pl + theme_bw() } @@ -271,11 +271,11 @@ ggsurv_m <- function( for (i in 1:strata) { indI <- (n.ind[i]+1):n.ind[i+1] gr.df[[i]] <- data.frame( - time = c(0, s$time[ indI ]), - surv = c(1, s$surv[ indI ]), - up = c(1, s$upper[ indI ]), - low = c(1, s$lower[ indI ]), - cens = c(0, s$n.censor[ indI ]), + time = c(0, s$time[indI]), + surv = c(1, s$surv[indI]), + up = c(1, s$upper[indI]), + low = c(1, s$lower[indI]), + cens = c(0, s$n.censor[indI]), group = rep(groups[i], n[i] + 1) ) } @@ -288,10 +288,10 @@ ggsurv_m <- function( ylab(ylab) + ggtitle(main) - pl <- if(surv.col[1] != 'gg.def'){ + pl <- if (surv.col[1] != 'gg.def') { scaleValues <- if (length(surv.col) == 1) { rep(surv.col, strata) - } else{ + } else { surv.col } pl + scale_colour_manual(values = scaleValues) @@ -307,7 +307,7 @@ ggsurv_m <- function( } pl <- pl + scale_linetype_manual(values = lineScaleValues) - if(identical(CI,TRUE)) { + if (identical(CI, TRUE)) { stepLty <- if ((length(surv.col) > 1 | surv.col == 'gg.def')[1]) { lty.ci } else { @@ -315,10 +315,10 @@ ggsurv_m <- function( } pl <- pl + geom_step(aes(y = up, lty = group, col = group), lty = stepLty, size = size.ci) + - geom_step(aes(y = low,lty = group, col = group), lty = stepLty, size = size.ci) + geom_step(aes(y = low, lty = group, col = group), lty = stepLty, size = size.ci) } - if (identical(plot.cens, TRUE) ){ + if (identical(plot.cens, TRUE)) { dat.cens <- subset(dat, cens != 0) dat.cens <- subset(dat.cens, group != "PKD") @@ -349,7 +349,7 @@ ggsurv_m <- function( } else if (length(cens.col) > 0) { - # if(!(identical(cens.col,surv.col) || is.null(cens.col))) { + # if (!(identical(cens.col, surv.col) || is.null(cens.col))) { # warning ("Color scales for survival curves and censored points don't match.\nOnly one color scale can be used. Defaulting to surv.col") # } @@ -391,7 +391,7 @@ ggsurv_m <- function( pl <- pl + geom_point( data = dtGroup, - mapping = aes(y=surv), + mapping = aes(y = surv), color = I(cens.col[i]), shape = cens.shape[i], show.legend = FALSE, @@ -404,7 +404,7 @@ ggsurv_m <- function( } } - if(identical(back.white, TRUE)) { + if (identical(back.white, TRUE)) { pl <- pl + theme_bw() } diff --git a/R/stat_cross.R b/R/stat_cross.R index 59646f556..174e280fb 100644 --- a/R/stat_cross.R +++ b/R/stat_cross.R @@ -138,8 +138,8 @@ StatCross <- ggproto("StatCross", Stat, # to handle the fact that ggplot2 could transform factors into integers # before computation of the statistic - if(is.numeric(data$x)) panel$x <- as.numeric(panel$x) - if(is.numeric(data$y)) panel$y <- as.numeric(panel$y) + if (is.numeric(data$x)) panel$x <- as.numeric(panel$x) + if (is.numeric(data$y)) panel$y <- as.numeric(panel$y) # keeping first value of other aesthetics in data panel <- merge( @@ -152,7 +152,7 @@ StatCross <- ggproto("StatCross", Stat, panel <- panel %>% dplyr::distinct(.data$x, .data$y, .keep_all = TRUE) if (!keep.zero.cells) { - panel <- panel[panel$observed != 0,] + panel <- panel[panel$observed != 0, ] } panel @@ -222,7 +222,7 @@ StatCross <- ggproto("StatCross", Stat, #' fill = "darkblue", #' geom_text_args = list(colour = "white", fontface = "bold", size = 6) #' )) -ggally_cross <- function(data, mapping, ..., scale_max_size = 20, geom_text_args = NULL){ +ggally_cross <- function(data, mapping, ..., scale_max_size = 20, geom_text_args = NULL) { mapping <- remove_color_unless_equal(mapping, to = c("x", "y")) mapping <- mapping_color_to_fill(mapping) @@ -231,10 +231,10 @@ ggally_cross <- function(data, mapping, ..., scale_max_size = 20, geom_text_args if (!"size" %in% names(mapping)) { mapping$size <- aes_string(size = "after_stat(observed)")$size } - if (is.null(mapping$shape) & is.null(args$shape)) { + if (is.null(mapping$shape) && is.null(args$shape)) { args$shape <- 22 } - if (is.null(mapping$fill) & is.null(args$fill)) { + if (is.null(mapping$fill) && is.null(args$fill)) { args$fill <- GeomRect$default_aes$fill } args$keep.zero.cells <- FALSE @@ -316,7 +316,7 @@ ggally_cross <- function(data, mapping, ..., scale_max_size = 20, geom_text_args #' geom_tile_args = list(colour = "black") #' ) + #' scale_fill_steps2(breaks = c(-3, -2, 2, 3), show.limits = TRUE)) -ggally_table <- function(data, mapping, keep.zero.cells = FALSE, ..., geom_tile_args = NULL){ +ggally_table <- function(data, mapping, keep.zero.cells = FALSE, ..., geom_tile_args = NULL) { mapping <- remove_color_unless_equal(mapping, to = c("x", "y")) # default values geom_text @@ -333,7 +333,7 @@ ggally_table <- function(data, mapping, keep.zero.cells = FALSE, ..., geom_tile_ geom_tile_args$mapping <- aes(colour = NULL)$colour if (is.null(geom_tile_args$colour)) geom_tile_args$colour <- "transparent" - if (is.null(mapping$fill) & is.null(geom_tile_args$fill)) + if (is.null(mapping$fill) && is.null(geom_tile_args$fill)) geom_tile_args$fill <- "transparent" ggplot(data = data, mapping) + @@ -394,7 +394,7 @@ ggally_crosstable <- function( fill = c("none", "std.resid", "resid"), ..., geom_tile_args = list(colour = "grey50") -){ +) { fill <- match.arg(fill) if (fill == "std.resid") mapping$fill <- aes_string(fill = "after_stat(std.resid)")$fill diff --git a/R/stat_prop.R b/R/stat_prop.R index 6a293719a..146022d2e 100644 --- a/R/stat_prop.R +++ b/R/stat_prop.R @@ -133,7 +133,9 @@ StatProp <- ggproto("StatProp", Stat, panel$count[is.na(panel$count)] <- 0 # compute proportions by by - sum_abs <- function(x) {sum(abs(x))} + sum_abs <- function(x) { + sum(abs(x)) + } panel$prop <- panel$count / ave(panel$count, panel$by, FUN = sum_abs) panel$width <- width panel$flipped_aes <- flipped_aes @@ -297,5 +299,3 @@ ggally_rowbar <- function( p } - - diff --git a/R/utils.R b/R/utils.R index 1d61c7b49..a3b54c84c 100644 --- a/R/utils.R +++ b/R/utils.R @@ -6,10 +6,13 @@ #' @param p plot to be displayed #' @export print_if_interactive <- function(p) { - if (interactive() || nzchar(Sys.getenv("CAN_PRINT"))) { + if (interactive() || nzchar(Sys.getenv("CAN_PRINT")) || on_ci()) { print(p) } } +on_ci <- function() { + isTRUE(as.logical(Sys.getenv("CI"))) +} #' Loads package namespaces @@ -27,7 +30,7 @@ require_namespaces <- function(pkgs) { } -str_c <- function (..., sep = "", collapse = NULL) { +str_c <- function(..., sep = "", collapse = NULL) { paste(..., sep = sep, collapse = collapse) } diff --git a/README.md b/README.md index cc2dd5d01..40c30f82a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![R build status](https://github.com/ggobi/ggally/workflows/R-CMD-check/badge.svg)](https://github.com/ggobi/ggally/actions) -[![codecov.io](https://codecov.io/github/ggobi/ggally/coverage.svg?branch=master)](https://codecov.io/github/ggobi/ggally?branch=master) + [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/GGally)](https://cran.r-project.org/package=GGally) [![](http://cranlogs.r-pkg.org/badges/GGally)](https://cran.r-project.org/package=GGally) [![DOI](https://zenodo.org/badge/22529/ggobi/ggally.svg)](https://zenodo.org/badge/latestdoi/22529/ggobi/ggally) diff --git a/man/add_and_overwrite_aes.Rd b/man/add_and_overwrite_aes.Rd index 8a793b79c..6a37c9edf 100644 --- a/man/add_and_overwrite_aes.Rd +++ b/man/add_and_overwrite_aes.Rd @@ -13,7 +13,7 @@ aes_ output Add new aesthetics to a previous aes. } \examples{ -data(diamonds, package="ggplot2") +data(diamonds, package = "ggplot2") diamonds.samp <- diamonds[sample(1:dim(diamonds)[1], 1000), ] pm <- ggpairs(diamonds.samp, columns = 5:7, mapping = ggplot2::aes(color = color), diff --git a/man/ggally_diagAxis.Rd b/man/ggally_diagAxis.Rd index c3a38a8e0..afa95f1fe 100644 --- a/man/ggally_diagAxis.Rd +++ b/man/ggally_diagAxis.Rd @@ -46,8 +46,8 @@ This function is used when \code{axisLabels == "internal"}. p_ <- GGally::print_if_interactive data(tips, package = "reshape") -p_(ggally_diagAxis(tips, ggplot2::aes(x=tip))) -p_(ggally_diagAxis(tips, ggplot2::aes(x=sex))) +p_(ggally_diagAxis(tips, ggplot2::aes(x = tip))) +p_(ggally_diagAxis(tips, ggplot2::aes(x = sex))) } \author{ Jason Crowley and Barret Schloerke diff --git a/man/ggally_dot.Rd b/man/ggally_dot.Rd index 1693e45f0..8ab20101f 100644 --- a/man/ggally_dot.Rd +++ b/man/ggally_dot.Rd @@ -33,7 +33,7 @@ p_(ggally_dot( p_(ggally_dot( tips, mapping = ggplot2::aes_string(y = "total_bill", x = "sex", color = "sex", shape = "sex") -) + ggplot2::scale_shape(solid=FALSE)) +) + ggplot2::scale_shape(solid = FALSE)) } \author{ Barret Schloerke diff --git a/man/ggduo.Rd b/man/ggduo.Rd index 7b83e29fd..9bb5b4b06 100644 --- a/man/ggduo.Rd +++ b/man/ggduo.Rd @@ -211,7 +211,7 @@ pm <- ggduo( rev(psych_variables), academic_variables, types = list(continuous = loess_with_cor), showStrips = FALSE, - legend = c(5,2) + legend = c(5, 2) ) suppressWarnings(p_(pm)) @@ -223,7 +223,7 @@ pm <- ggduo( rev(psych_variables), academic_variables, types = list(continuous = loess_with_cor), showStrips = FALSE, - legend = c(5,2) + legend = c(5, 2) ) + ggplot2::theme(legend.position = "bottom") suppressWarnings(p_(pm)) diff --git a/man/ggfacet.Rd b/man/ggfacet.Rd index 2e3fcb7cb..bbf1da6a4 100644 --- a/man/ggfacet.Rd +++ b/man/ggfacet.Rd @@ -46,7 +46,7 @@ Single \pkg{ggplot2} plot matrix with \code{\link[ggplot2]{facet_grid}} p_ <- GGally::print_if_interactive if (requireNamespace("chemometrics", quietly = TRUE)) { data(NIR, package = "chemometrics") - NIR_sub <- data.frame(NIR$yGlcEtOH, NIR$xNIR[,1:3]) + NIR_sub <- data.frame(NIR$yGlcEtOH, NIR$xNIR[, 1:3]) str(NIR_sub) x_cols <- c("X1115.0", "X1120.0", "X1125.0") y_cols <- c("Glucose", "Ethanol") diff --git a/man/gglegend.Rd b/man/gglegend.Rd index 639c977e6..d2c9a307d 100644 --- a/man/gglegend.Rd +++ b/man/gglegend.Rd @@ -48,6 +48,6 @@ p_(pm) # Place a legend in a specific location pm <- ggpairs(iris, 1:2, mapping = ggplot2::aes(color = Species)) # Make the legend -pm[1,2] <- points_legend(iris, ggplot2::aes(Sepal.Width, Sepal.Length, color = Species)) +pm[1, 2] <- points_legend(iris, ggplot2::aes(Sepal.Width, Sepal.Length, color = Species)) p_(pm) } diff --git a/man/ggmatrix_gtable.Rd b/man/ggmatrix_gtable.Rd index e5f485d0b..73651bd4e 100644 --- a/man/ggmatrix_gtable.Rd +++ b/man/ggmatrix_gtable.Rd @@ -23,7 +23,7 @@ Specialized method to print the \code{\link{ggmatrix}} object. } \examples{ data(tips, package = "reshape") -pm <- ggpairs(tips, c(1,3,2), mapping = ggplot2::aes_string(color = "sex")) +pm <- ggpairs(tips, c(1, 3, 2), mapping = ggplot2::aes_string(color = "sex")) ggmatrix_gtable(pm) } \author{ diff --git a/man/ggmatrix_location.Rd b/man/ggmatrix_location.Rd index 64b0392a0..09f7544ea 100644 --- a/man/ggmatrix_location.Rd +++ b/man/ggmatrix_location.Rd @@ -63,13 +63,13 @@ ggmatrix_location(pm, rows = 2) ggmatrix_location(pm, cols = 2) # row and column combinations -ggmatrix_location(pm, rows = c(1,2), cols = c(1,3)) +ggmatrix_location(pm, rows = c(1, 2), cols = c(1, 3)) # matrix locations mat <- matrix(TRUE, ncol = 3, nrow = 3) -mat[1,1] <- FALSE +mat[1, 1] <- FALSE locs <- ggmatrix_location(pm, location = mat) -## does not contain the 1,1 cell +## does not contain the 1, 1 cell locs # Use the output of a prior ggmatrix_location diff --git a/man/ggmatrix_progress.Rd b/man/ggmatrix_progress.Rd index 9be777b2e..96d4b2e59 100644 --- a/man/ggmatrix_progress.Rd +++ b/man/ggmatrix_progress.Rd @@ -5,7 +5,7 @@ \title{\code{\link{ggmatrix}} default progress bar} \usage{ ggmatrix_progress( - format = " plot: [:plot_i,:plot_j] [:bar]:percent est::eta ", + format = " plot: [:plot_i, :plot_j] [:bar]:percent est::eta ", clear = TRUE, show_after = 0, ... diff --git a/man/ggnet.Rd b/man/ggnet.Rd index a0a34960f..e371d9061 100644 --- a/man/ggnet.Rd +++ b/man/ggnet.Rd @@ -215,8 +215,8 @@ x <- 10 ndyads <- x * (x - 1) density <- x / ndyads m <- matrix(0, nrow = x, ncol = x) -dimnames(m) <- list(letters[ 1:x ], letters[ 1:x ]) -m[ row(m) != col(m) ] <- runif(ndyads) < density +dimnames(m) <- list(letters[1:x], letters[1:x]) +m[row(m) != col(m)] <- runif(ndyads) < density m # random undirected network @@ -226,7 +226,7 @@ n ggnet(n, label = TRUE, alpha = 1, color = "white", segment.color = "black") # random groups -g <- sample(letters[ 1:3 ], 10, replace = TRUE) +g <- sample(letters[1:3], 10, replace = TRUE) g # color palette diff --git a/man/ggnet2.Rd b/man/ggnet2.Rd index 4e241d9e8..e97fd1c56 100644 --- a/man/ggnet2.Rd +++ b/man/ggnet2.Rd @@ -303,8 +303,8 @@ x <- 10 ndyads <- x * (x - 1) density <- x / ndyads m <- matrix(0, nrow = x, ncol = x) -dimnames(m) <- list(letters[ 1:x ], letters[ 1:x ]) -m[ row(m) != col(m) ] <- runif(ndyads) < density +dimnames(m) <- list(letters[1:x], letters[1:x]) +m[row(m) != col(m)] <- runif(ndyads) < density m # random undirected network diff --git a/man/ggnetworkmap.Rd b/man/ggnetworkmap.Rd index 4e2611e56..6690db44f 100644 --- a/man/ggnetworkmap.Rd +++ b/man/ggnetworkmap.Rd @@ -100,8 +100,8 @@ flights <- data.frame( flights <- network(flights, directed = TRUE) # add geographic coordinates -flights \%v\% "lat" <- airports[ network.vertex.names(flights), "lat" ] -flights \%v\% "lon" <- airports[ network.vertex.names(flights), "long" ] +flights \%v\% "lat" <- airports[network.vertex.names(flights), "lat"] +flights \%v\% "lon" <- airports[network.vertex.names(flights), "long"] # drop isolated airports delete.vertices(flights, which(degree(flights) < 2)) diff --git a/man/ggnostic.Rd b/man/ggnostic.Rd index 08fdb04c1..e7e45c130 100644 --- a/man/ggnostic.Rd +++ b/man/ggnostic.Rd @@ -18,7 +18,7 @@ ggnostic( ggally_nostic_se_fit, .resid = ggally_nostic_resid, .hat = ggally_nostic_hat, .sigma = ggally_nostic_sigma, .cooksd = ggally_nostic_cooksd, .std.resid = ggally_nostic_std_resid), - combo = list(default = ggally_box_no_facet, fitted = ggally_box_no_facet, .se.fit = + combo = list(default = ggally_box_no_facet, .fitted = ggally_box_no_facet, .se.fit = ggally_nostic_se_fit, .resid = ggally_nostic_resid, .hat = ggally_nostic_hat, .sigma = ggally_nostic_sigma, .cooksd = ggally_nostic_cooksd, .std.resid = ggally_nostic_std_resid), diff --git a/man/ggpairs.Rd b/man/ggpairs.Rd index 86ef8e016..61d3aa76f 100644 --- a/man/ggpairs.Rd +++ b/man/ggpairs.Rd @@ -103,7 +103,7 @@ p_ <- GGally::print_if_interactive ## Quick example, with and without colour data(flea) ggpairs(flea, columns = 2:4) -pm <- ggpairs(flea, columns = 2:4, ggplot2::aes(colour=species)) +pm <- ggpairs(flea, columns = 2:4, ggplot2::aes(colour = species)) p_(pm) # Note: colour should be categorical, else you will need to reset # the upper triangle to use points instead of trying to compute corr @@ -133,7 +133,7 @@ pm <- ggpairs( p_(pm) # Use sample of the diamonds data -data(diamonds, package="ggplot2") +data(diamonds, package = "ggplot2") diamonds.samp <- diamonds[sample(1:dim(diamonds)[1], 1000), ] # Different aesthetics for different plot sections and plot types @@ -148,10 +148,10 @@ p_(pm) ## Axis Label Variations # Only Variable Labels on the diagonal (no axis labels) -pm <- ggpairs(tips[, 1:3], axisLabels="internal") +pm <- ggpairs(tips[, 1:3], axisLabels = "internal") p_(pm) # Only Variable Labels on the outside (no axis labels) -pm <- ggpairs(tips[, 1:3], axisLabels="none") +pm <- ggpairs(tips[, 1:3], axisLabels = "none") p_(pm) ## Facet Label Variations @@ -175,10 +175,10 @@ p_(pm) ## Plot Insertion Example custom_car <- ggpairs(mtcars[, c("mpg", "wt", "cyl")], upper = "blank", title = "Custom Example") # ggplot example taken from example(geom_text) - plot <- ggplot2::ggplot(mtcars, ggplot2::aes(x=wt, y=mpg, label=rownames(mtcars))) + plot <- ggplot2::ggplot(mtcars, ggplot2::aes(x = wt, y = mpg, label = rownames(mtcars))) plot <- plot + - ggplot2::geom_text(ggplot2::aes(colour=factor(cyl)), size = 3) + - ggplot2::scale_colour_discrete(l=40) + ggplot2::geom_text(ggplot2::aes(colour = factor(cyl)), size = 3) + + ggplot2::scale_colour_discrete(l = 40) custom_car[1, 2] <- plot personal_plot <- ggally_text( "ggpairs allows you\nto put in your\nown plot.\nLike that one.\n <---" diff --git a/man/ggparcoord.Rd b/man/ggparcoord.Rd index 19e750378..08845bfac 100644 --- a/man/ggparcoord.Rd +++ b/man/ggparcoord.Rd @@ -118,7 +118,7 @@ package loaded.} p_ <- GGally::print_if_interactive # use sample of the diamonds data for illustrative purposes -data(diamonds, package="ggplot2") +data(diamonds, package = "ggplot2") diamonds.samp <- diamonds[sample(1:dim(diamonds)[1], 100), ] # basic parallel coordinate plot, using default settings @@ -143,7 +143,7 @@ p_(p) # basic parallel coord plot of the msleep data, using 'random' imputation and # coloring by diet (can also use variable names in the columns and groupColumn # arguments) -data(msleep, package="ggplot2") +data(msleep, package = "ggplot2") p <- ggparcoord(data = msleep, columns = 6:11, groupColumn = "vore", missing = "random", scale = "uniminmax") p_(p) diff --git a/man/ggsurv.Rd b/man/ggsurv.Rd index 78d37f211..b0e1d69ea 100644 --- a/man/ggsurv.Rd +++ b/man/ggsurv.Rd @@ -76,7 +76,7 @@ multiple strata objects. p_ <- GGally::print_if_interactive if (require(survival) && require(scales)) { - data(lung, package = "survival") + lung <- survival::lung sf.lung <- survival::survfit(Surv(time, status) ~ 1, data = lung) p_(ggsurv(sf.lung)) @@ -90,7 +90,7 @@ if (require(survival) && require(scales)) { ggplot2::guides(linetype = "none") + ggplot2::scale_colour_discrete( name = 'Sex', - breaks = c(1,2), + breaks = c(1, 2), labels = c('Male', 'Female') )) @@ -104,7 +104,7 @@ if (require(survival) && require(scales)) { p_(pl.sex2 + labs(color = "New Title", linetype = "New Title")) # We can still adjust the plot after fitting - data(kidney, package = "survival") + kidney <- survival::kidney sf.kid <- survival::survfit(Surv(time, status) ~ disease, data = kidney) pl.kid <- ggsurv(sf.kid, plot.cens = FALSE) p_(pl.kid) diff --git a/man/glyphs.Rd b/man/glyphs.Rd index e2534f74a..6c746db0c 100644 --- a/man/glyphs.Rd +++ b/man/glyphs.Rd @@ -50,7 +50,7 @@ nasaLate <- nasa[ nasa$long >= -80 & nasa$long <= -60 , ] -temp.gly <- glyphs(nasaLate, "long", "day", "lat", "surftemp", height=2.5) +temp.gly <- glyphs(nasaLate, "long", "day", "lat", "surftemp", height = 2.5) p_(ggplot2::ggplot(temp.gly, ggplot2::aes(gx, gy, group = gid)) + add_ref_lines(temp.gly, color = "grey90") + add_ref_boxes(temp.gly, color = "grey90") + diff --git a/man/lowertriangle.Rd b/man/lowertriangle.Rd index 95dda23fc..fab34e0ad 100644 --- a/man/lowertriangle.Rd +++ b/man/lowertriangle.Rd @@ -18,9 +18,9 @@ function for making the melted dataset used to plot the lowertriangle scatterplo } \examples{ data(flea) -head(lowertriangle(flea, columns= 2:4)) +head(lowertriangle(flea, columns = 2:4)) head(lowertriangle(flea)) -head(lowertriangle(flea, color="species")) +head(lowertriangle(flea, color = "species")) } \author{ Mengjia Ni, Di Cook diff --git a/man/print.ggmatrix.Rd b/man/print.ggmatrix.Rd index 3d8b1268a..3f92e988d 100644 --- a/man/print.ggmatrix.Rd +++ b/man/print.ggmatrix.Rd @@ -20,7 +20,7 @@ Print method taken from \code{ggplot2:::print.ggplot} and altered for a \code{\l } \examples{ data(tips, package = "reshape") - pMat <- ggpairs(tips, c(1,3,2), mapping = ggplot2::aes_string(color = "sex")) + pMat <- ggpairs(tips, c(1, 3, 2), mapping = ggplot2::aes_string(color = "sex")) pMat # calls print(pMat), which calls print.ggmatrix(pMat) } \author{ diff --git a/man/putPlot.Rd b/man/putPlot.Rd index 1bbfaf183..d9edc70c9 100644 --- a/man/putPlot.Rd +++ b/man/putPlot.Rd @@ -29,10 +29,10 @@ p_ <- GGally::print_if_interactive custom_car <- ggpairs(mtcars[, c("mpg", "wt", "cyl")], upper = "blank", title = "Custom Example") # ggplot example taken from example(geom_text) - plot <- ggplot2::ggplot(mtcars, ggplot2::aes(x=wt, y=mpg, label=rownames(mtcars))) + plot <- ggplot2::ggplot(mtcars, ggplot2::aes(x = wt, y = mpg, label = rownames(mtcars))) plot <- plot + - ggplot2::geom_text(ggplot2::aes(colour=factor(cyl)), size = 3) + - ggplot2::scale_colour_discrete(l=40) + ggplot2::geom_text(ggplot2::aes(colour = factor(cyl)), size = 3) + + ggplot2::scale_colour_discrete(l = 40) custom_car[1, 2] <- plot personal_plot <- ggally_text( "ggpairs allows you\nto put in your\nown plot.\nLike that one.\n <---" @@ -41,9 +41,9 @@ custom_car[1, 3] <- personal_plot # custom_car # remove plots after creating a plot matrix -custom_car[2,1] <- NULL -custom_car[3,1] <- "blank" # the same as storing null -custom_car[3,2] <- NULL +custom_car[2, 1] <- NULL +custom_car[3, 1] <- "blank" # the same as storing null +custom_car[3, 2] <- NULL p_(custom_car) } \seealso{ diff --git a/man/scatmat.Rd b/man/scatmat.Rd index 6f498aa78..ceaa58374 100644 --- a/man/scatmat.Rd +++ b/man/scatmat.Rd @@ -24,8 +24,8 @@ p_ <- GGally::print_if_interactive data(flea) -p_(scatmat(flea, columns=2:4)) -p_(scatmat(flea, columns= 2:4, color="species")) +p_(scatmat(flea, columns = 2:4)) +p_(scatmat(flea, columns= 2:4, color = "species")) } \author{ Mengjia Ni, Di Cook diff --git a/man/uppertriangle.Rd b/man/uppertriangle.Rd index 2bd52f81e..1afc41e8f 100644 --- a/man/uppertriangle.Rd +++ b/man/uppertriangle.Rd @@ -25,9 +25,9 @@ Function for making the dataset used to plot the uppertriangle plots. } \examples{ data(flea) -head(uppertriangle(flea, columns=2:4)) +head(uppertriangle(flea, columns = 2:4)) head(uppertriangle(flea)) -head(uppertriangle(flea, color="species")) +head(uppertriangle(flea, color = "species")) } \author{ Mengjia Ni, Di Cook diff --git a/notes/color.R b/notes/color.R index 7e115d48a..3e49e2350 100644 --- a/notes/color.R +++ b/notes/color.R @@ -1,6 +1,6 @@ mtcars -ggparcoord(mtcars, columns = c(1,3:6), mapping = aes(size = gear)) +ggparcoord(mtcars, columns = c(1, 3:6), mapping = aes(size = gear)) dt <- melt(mtcars, c("mpg", "cyl", "disp", "hp", "drat", "wt", "qsec")) diff --git a/notes/correlation-custom.R b/notes/correlation-custom.R index 5cb31db05..b1710a834 100644 --- a/notes/correlation-custom.R +++ b/notes/correlation-custom.R @@ -24,7 +24,7 @@ #' mapping = ggplot2::aes_string(x = "total_bill", y = "tip", color = "sex"), #' size = 5 #' ) -ggally_custom_cor_fn <- function(data, mapping, corAlignPercent = 0.6, corMethod = "pearson", corUse = "complete.obs", ...){ +ggally_custom_cor_fn <- function(data, mapping, corAlignPercent = 0.6, corMethod = "pearson", corUse = "complete.obs", ...) { useOptions = c("all.obs", "complete.obs", "pairwise.complete.obs", "everything", "na.or.complete") corUse <- pmatch(corUse, useOptions) @@ -50,9 +50,9 @@ ggally_custom_cor_fn <- function(data, mapping, corAlignPercent = 0.6, corMethod cor_fn <- function(x, y) { # also do ddply below if fn is altered - # pVals <- cor(x,y, method = corMethod, use = corUse) - corObj <- stats::cor.test(x,y, method = corMethod, use = corUse) - signifPVals <- sprintf("%.3f",corObj$estimate) + # pVals <- cor(x, y, method = corMethod, use = corUse) + corObj <- stats::cor.test(x, y, method = corMethod, use = corUse) + signifPVals <- sprintf("%.3f", corObj$estimate) pStars <- cor_stars(corObj$p.value) ret <- str_c(signifPVals, pStars) @@ -83,15 +83,15 @@ ggally_custom_cor_fn <- function(data, mapping, corAlignPercent = 0.6, corMethod xCol <- as.character(mapping$x) yCol <- as.character(mapping$y) - # if (is_date(data[,xCol]) || is_date(data[,yCol])) { + # if (is_date(data[, xCol]) || is_date(data[, yCol])) { # # # make sure it's a data.frame, as data.tables don't work well - # if (! identical(class(data),"data.frame")) { + # if (! identical(class(data), "data.frame")) { # data <- as.data.frame(data) # } # # for (col in c(xCol, yCol)) { - # if (is_date(data[,col])) { + # if (is_date(data[, col])) { # data[, col] <- as.numeric(data[, col]) # } # } @@ -101,17 +101,17 @@ ggally_custom_cor_fn <- function(data, mapping, corAlignPercent = 0.6, corMethod singleColorCol <- paste(colorCol, collapse = "") if (corUse %in% c("complete.obs", "pairwise.complete.obs", "na.or.complete")) { - if(length(colorCol) > 0) { - if(singleColorCol %in% colnames(data)) { - rows <- complete.cases(data[,c(xCol,yCol,colorCol)]) + if (length(colorCol) > 0) { + if (singleColorCol %in% colnames(data)) { + rows <- complete.cases(data[, c(xCol, yCol, colorCol)]) } else { - rows <- complete.cases(data[,c(xCol,yCol)]) + rows <- complete.cases(data[, c(xCol, yCol)]) } } else { - rows <- complete.cases(data[,c(xCol,yCol)]) + rows <- complete.cases(data[, c(xCol, yCol)]) } - if(any(!rows)) { + if (any(!rows)) { total <- sum(!rows) if (total > 1) { warning("Removed ", total, " rows containing missing values") @@ -122,19 +122,19 @@ ggally_custom_cor_fn <- function(data, mapping, corAlignPercent = 0.6, corMethod data <- data[rows, ] } - xVal <- data[,xCol] - yVal <- data[,yCol] + xVal <- data[, xCol] + yVal <- data[, yCol] - if(length(names(mapping)) > 0){ - for(i in length(names(mapping)):1){ + if (length(names(mapping)) > 0) { + for (i in length(names(mapping)):1) { # find the last value of the aes, such as cyl of as.factor(cyl) tmp_map_val <- as.character(mapping[names(mapping)[i]][[1]]) - if(tmp_map_val[length(tmp_map_val)] %in% colnames(data)) + if (tmp_map_val[length(tmp_map_val)] %in% colnames(data)) mapping[names(mapping)[i]] <- NULL - if(length(names(mapping)) < 1){ + if (length(names(mapping)) < 1) { mapping <- NULL - break; + break } } } @@ -160,9 +160,9 @@ ggally_custom_cor_fn <- function(data, mapping, corAlignPercent = 0.6, corMethod # put in correct order lev <- levels(data[[colorCol]]) ord <- rep(-1, nrow(cord)) - for(i in 1:nrow(cord)) { - for(j in seq_along(lev)){ - if(identical(as.character(cord[i, colorCol]), as.character(lev[j]))) { + for (i in 1:nrow(cord)) { + for (j in seq_along(lev)) { + if (identical(as.character(cord[i, colorCol]), as.character(lev[j]))) { ord[i] <- j } } @@ -177,15 +177,15 @@ ggally_custom_cor_fn <- function(data, mapping, corAlignPercent = 0.6, corMethod # calculate variable ranges so the gridlines line up xmin <- min(xVal, na.rm = TRUE) xmax <- max(xVal, na.rm = TRUE) - xrange <- c(xmin-.01*(xmax-xmin),xmax+.01*(xmax-xmin)) + xrange <- c(xmin - .01 * (xmax - xmin), xmax + .01 * (xmax - xmin)) ymin <- min(yVal, na.rm = TRUE) ymax <- max(yVal, na.rm = TRUE) - yrange <- c(ymin-.01*(ymax-ymin),ymax+.01*(ymax-ymin)) + yrange <- c(ymin - .01 * (ymax - ymin), ymax + .01 * (ymax - ymin)) # print(cord) p <- ggally_text( - label = str_c("r=", cor_fn(xVal,yVal)), + label = str_c("r=", cor_fn(xVal, yVal)), mapping = mapping, xP = 0.5, yP = 0.9, @@ -228,16 +228,16 @@ ggally_custom_cor_fn <- function(data, mapping, corAlignPercent = 0.6, corMethod # calculate variable ranges so the gridlines line up xmin <- min(xVal, na.rm = TRUE) xmax <- max(xVal, na.rm = TRUE) - xrange <- c(xmin-.01*(xmax-xmin),xmax+.01*(xmax-xmin)) + xrange <- c(xmin - .01 * (xmax - xmin), xmax + .01 * (xmax - xmin)) ymin <- min(yVal, na.rm = TRUE) ymax <- max(yVal, na.rm = TRUE) - yrange <- c(ymin-.01*(ymax-ymin),ymax+.01*(ymax-ymin)) + yrange <- c(ymin - .01 * (ymax - ymin), ymax + .01 * (ymax - ymin)) p <- ggally_text( - label = str_c("r=\n", cor_fn(xVal,yVal), collapse=""), + label = str_c("r=\n", cor_fn(xVal, yVal), collapse = ""), mapping, - xP=0.5, - yP=0.5, + xP = 0.5, + yP = 0.5, xrange = xrange, yrange = yrange, ... @@ -258,5 +258,5 @@ ggally_custom_cor_fn <- function(data, mapping, corAlignPercent = 0.6, corMethod ggally_custom_cor_fn(tips, mapping = ggplot2::aes_string(x = "total_bill", y = "tip", color = "sex")) -ggpairs(tips, 1:3, columnLabels = c("Total Bill", "Tip", "Sex"), upper=list(continuous = "custom_cor_fn")) -ggpairs(tips, 1:3, columnLabels = c("Total Bill", "Tip", "Sex"), upper=list(continuous = "custom_cor_fn"), color = "sex") +ggpairs(tips, 1:3, columnLabels = c("Total Bill", "Tip", "Sex"), upper = list(continuous = "custom_cor_fn")) +ggpairs(tips, 1:3, columnLabels = c("Total Bill", "Tip", "Sex"), upper = list(continuous = "custom_cor_fn"), color = "sex") diff --git a/notes/correlation.R b/notes/correlation.R index e462c3532..4f58ebe32 100644 --- a/notes/correlation.R +++ b/notes/correlation.R @@ -3,16 +3,16 @@ ggpairs(tips, columns = 1:2, params = c(corMethod = "kendall")) ggpairs(tips, columns = 1:2, params = c(corMethod = "pearson"), color = "sex") ggpairs(tips, columns = 1:2, params = c(corMethod = "kendall"), color = "sex") -ggpairs(tips, columns = 1:2, upper = list( params = list(corMethod = "kendall"))) -ggpairs(tips, columns = 1:2, upper = list( params = list(corMethod = "pearson"))) -ggpairs(tips, columns = 1:2, upper = list( params = list(corMethod = "pearson")), color = "sex") -ggpairs(tips, columns = 1:2, upper = list( params = list(corMethod = "kendall")), color = "sex") +ggpairs(tips, columns = 1:2, upper = list(params = list(corMethod = "kendall"))) +ggpairs(tips, columns = 1:2, upper = list(params = list(corMethod = "pearson"))) +ggpairs(tips, columns = 1:2, upper = list(params = list(corMethod = "pearson")), color = "sex") +ggpairs(tips, columns = 1:2, upper = list(params = list(corMethod = "kendall")), color = "sex") swM <- swiss -colnames(swM) <- abbreviate(colnames(swiss), min=6) -swM[1,2] <- swM[7,3] <- swM[25,5] <- NA # create 3 "missing" +colnames(swM) <- abbreviate(colnames(swiss), min = 6) +swM[1, 2] <- swM[7, 3] <- swM[25, 5] <- NA # create 3 "missing" ## Consider all 5 "use" cases : (C. <- cov(swM)) # use="everything" quite a few NA's in cov.matrix try(cov(swM, use = "all")) # Error: missing obs... @@ -25,10 +25,10 @@ range(eigen(C3, only.values = TRUE)$values) # 6.19 1938 # using full data -cor(mtcars[, 1:3], method = "kendall", use = "complete")[2,3] +cor(mtcars[, 1:3], method = "kendall", use = "complete")[2, 3] 0.7915213 -cor(mtcars[, 1:3], method = "kendall", use = "pairwise")[2,3] # matches below -cor(mtcars[, 1:3], method = "kendall", use = "na.or")[2,3] +cor(mtcars[, 1:3], method = "kendall", use = "pairwise")[2, 3] # matches below +cor(mtcars[, 1:3], method = "kendall", use = "na.or")[2, 3] # only two columns cor(mtcars$cyl, mtcars$disp, method = "kendall", use = "complete") diff --git a/codecov.yml b/notes/old-codecov.yml similarity index 100% rename from codecov.yml rename to notes/old-codecov.yml diff --git a/notes/strip-top.R b/notes/strip-top.R index 3094a7eac..2fb6d7652 100644 --- a/notes/strip-top.R +++ b/notes/strip-top.R @@ -14,11 +14,10 @@ ggplot_gtable(ggplot_build(p)) -> x2 gtable_show_layout(x2) grid.draw(gtable_filter(x, "strip-top")) -grid.draw(gtable_filter(x, "strip-top")[1,]) +grid.draw(gtable_filter(x, "strip-top")[1, ]) gtable_show_layout(x) gtable_show_layout(x2) -str(x2, max.level=2) +str(x2, max.level = 2) x2$heights[[3]] - diff --git a/scripts/revdepcheck.R b/scripts/revdepcheck.R index af5bb76b0..1575004ac 100644 --- a/scripts/revdepcheck.R +++ b/scripts/revdepcheck.R @@ -3,7 +3,7 @@ local({ - dev_revdep <- function ( + dev_revdep <- function( pkg = ".", ..., num_workers = 6, @@ -23,7 +23,7 @@ local({ remotes::install_cran( setdiff( desc::desc_get_deps(basename(normalizePath(pkg)))$package, - c("R", unname(installed.packages(priority = "base")[,"Package", drop = TRUE])) + c("R", unname(installed.packages(priority = "base")[, "Package", drop = TRUE])) ) ) } diff --git a/tests/spelling.R b/tests/spelling.R index 56642bb41..63196951f 100644 --- a/tests/spelling.R +++ b/tests/spelling.R @@ -1,7 +1,7 @@ # `devtools::spell_check()` # only check spelling if on CI and spelling is available -if (requireNamespace('spelling', quietly = TRUE)) { +if (requireNamespace("spelling", quietly = TRUE)) { if (isTRUE(as.logical(Sys.getenv("CI")))) { spelling::spell_check_test(vignettes = TRUE, error = FALSE, skip_on_cran = TRUE) diff --git a/tests/testthat.R b/tests/testthat.R index 5a8a1f937..e30bed7ac 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -1,5 +1,5 @@ -if (requireNamespace('testthat', quietly = TRUE)) { +if (requireNamespace("testthat", quietly = TRUE)) { library(testthat) library(GGally) diff --git a/tests/testthat/_snaps/gg-plots/cor-green.svg b/tests/testthat/_snaps/gg-plots/cor-green.svg new file mode 100644 index 000000000..fb2ac7a6a --- /dev/null +++ b/tests/testthat/_snaps/gg-plots/cor-green.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + +Corr: 0.676*** + + + +2.5 +5.0 +7.5 +10.0 + + + + + + + + + +10 +20 +30 +40 +50 +cor-green + + diff --git a/tests/testthat/_snaps/gg-plots/rescale-false-binwidth.svg b/tests/testthat/_snaps/gg-plots/rescale-false-binwidth.svg new file mode 100644 index 000000000..d92f9d5a5 --- /dev/null +++ b/tests/testthat/_snaps/gg-plots/rescale-false-binwidth.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +10 +20 +30 +40 + + + + + + + + + +2.5 +5.0 +7.5 +10.0 +tip +count +rescale-false-binwidth + + diff --git a/tests/testthat/_snaps/gg-plots/rescale-false.svg b/tests/testthat/_snaps/gg-plots/rescale-false.svg new file mode 100644 index 000000000..94576d640 --- /dev/null +++ b/tests/testthat/_snaps/gg-plots/rescale-false.svg @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.0 +0.2 +0.4 +0.6 +0.8 + + + + + + + + + +Fri +Sat +Sun +Thur +day +density +rescale-false + + diff --git a/tests/testthat/_snaps/gg-plots/rescale-true-binwidth.svg b/tests/testthat/_snaps/gg-plots/rescale-true-binwidth.svg new file mode 100644 index 000000000..e7bf51a65 --- /dev/null +++ b/tests/testthat/_snaps/gg-plots/rescale-true-binwidth.svg @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +2.5 +5.0 +7.5 +10.0 + + + + + + + + +2.5 +5.0 +7.5 +10.0 +tip +density/max(density) * diff(range(x, na.rm = TRUE)) + min(x, ... +rescale-true-binwidth + + diff --git a/tests/testthat/_snaps/gg-plots/rescale-true.svg b/tests/testthat/_snaps/gg-plots/rescale-true.svg new file mode 100644 index 000000000..36f6bba12 --- /dev/null +++ b/tests/testthat/_snaps/gg-plots/rescale-true.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +1 +2 +3 +4 + + + + + + + + +Fri +Sat +Sun +Thur +day +scaled * diff(range(x, na.rm = TRUE)) + min(x, na.rm = TRUE) +rescale-true + + diff --git a/tests/testthat/_snaps/gg-plots/shrink-false.svg b/tests/testthat/_snaps/gg-plots/shrink-false.svg new file mode 100644 index 000000000..b5ac26c44 --- /dev/null +++ b/tests/testthat/_snaps/gg-plots/shrink-false.svg @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +2 +4 +6 + + + + + + + + + + +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 +Sepal.Width +Petal.Length +shrink-false + + diff --git a/tests/testthat/_snaps/gg-plots/shrink-true.svg b/tests/testthat/_snaps/gg-plots/shrink-true.svg new file mode 100644 index 000000000..1ec249c95 --- /dev/null +++ b/tests/testthat/_snaps/gg-plots/shrink-true.svg @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +2 +4 +6 + + + + + + + + + +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 +Sepal.Width +Petal.Length +shrink-true + + diff --git a/tests/testthat/_snaps/gg-plots/smooth-se-false.svg b/tests/testthat/_snaps/gg-plots/smooth-se-false.svg new file mode 100644 index 000000000..06df37910 --- /dev/null +++ b/tests/testthat/_snaps/gg-plots/smooth-se-false.svg @@ -0,0 +1,206 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +2 +4 +6 + + + + + + + + + +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 +Sepal.Width +Petal.Length +smooth-se-false + + diff --git a/tests/testthat/_snaps/gg-plots/smooth-se-true.svg b/tests/testthat/_snaps/gg-plots/smooth-se-true.svg new file mode 100644 index 000000000..aa3e98590 --- /dev/null +++ b/tests/testthat/_snaps/gg-plots/smooth-se-true.svg @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +2 +4 +6 + + + + + + + + + +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 +Sepal.Width +Petal.Length +smooth-se-true + + diff --git a/tests/testthat/_snaps/gg-plots/titanic-count-class.svg b/tests/testthat/_snaps/gg-plots/titanic-count-class.svg new file mode 100644 index 000000000..2ccada2c2 --- /dev/null +++ b/tests/testthat/_snaps/gg-plots/titanic-count-class.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No +Yes + + + + + + +1st +2nd +3rd +Crew +Class +Survived + +Class + + + + + + + + +1st +2nd +3rd +Crew +titanic-count-class + + diff --git a/tests/testthat/_snaps/gg-plots/titanic-count-diag-class.svg b/tests/testthat/_snaps/gg-plots/titanic-count-diag-class.svg new file mode 100644 index 000000000..221ea16b0 --- /dev/null +++ b/tests/testthat/_snaps/gg-plots/titanic-count-diag-class.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No +Yes + + + + + + +1st +2nd +3rd +Crew +Class +Survived + +Class + + + + + + + + +1st +2nd +3rd +Crew +titanic-count-diag-class + + diff --git a/tests/testthat/_snaps/gg-plots/titanic-count-diag-interaction.svg b/tests/testthat/_snaps/gg-plots/titanic-count-diag-interaction.svg new file mode 100644 index 000000000..d30acc67e --- /dev/null +++ b/tests/testthat/_snaps/gg-plots/titanic-count-diag-interaction.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No +Yes + + + + + + + + + + +1st.Child +2nd.Child +3rd.Child +Crew.Child +1st.Adult +2nd.Adult +3rd.Adult +Crew.Adult +interaction(Class, Age) +Survived + +Class + + + + + + + + +1st +2nd +3rd +Crew +titanic-count-diag-interaction + + diff --git a/tests/testthat/_snaps/gg-plots/titanic-count-diag.svg b/tests/testthat/_snaps/gg-plots/titanic-count-diag.svg new file mode 100644 index 000000000..1a1afcb76 --- /dev/null +++ b/tests/testthat/_snaps/gg-plots/titanic-count-diag.svg @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No +Yes + + + + +No +Yes +Survived +Survived + +Class + + + + + + + + +1st +2nd +3rd +Crew +titanic-count-diag + + diff --git a/tests/testthat/_snaps/gg-plots/titanic-count-interaction.svg b/tests/testthat/_snaps/gg-plots/titanic-count-interaction.svg new file mode 100644 index 000000000..deaf935cd --- /dev/null +++ b/tests/testthat/_snaps/gg-plots/titanic-count-interaction.svg @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Male.Child +Female.Child +Male.Adult +Female.Adult + + + + + + +No +Yes +Survived +interaction(Sex, Age) + +Class + + + + + + + + +1st +2nd +3rd +Crew +titanic-count-interaction + + diff --git a/tests/testthat/_snaps/gg-plots/titanic-count-red.svg b/tests/testthat/_snaps/gg-plots/titanic-count-red.svg new file mode 100644 index 000000000..3193c56e8 --- /dev/null +++ b/tests/testthat/_snaps/gg-plots/titanic-count-red.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No +Yes + + + + + + +1st +2nd +3rd +Crew +Class +Survived +titanic-count-red + + diff --git a/tests/testthat/_snaps/gg-plots/titanic-count-sex.svg b/tests/testthat/_snaps/gg-plots/titanic-count-sex.svg new file mode 100644 index 000000000..01f98dab2 --- /dev/null +++ b/tests/testthat/_snaps/gg-plots/titanic-count-sex.svg @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No +Yes + + + + + + +1st +2nd +3rd +Crew +Class +Survived + +Sex + + + + +Male +Female +titanic-count-sex + + diff --git a/tests/testthat/_snaps/gg-plots/titanic-count-toupper.svg b/tests/testthat/_snaps/gg-plots/titanic-count-toupper.svg new file mode 100644 index 000000000..94cc3ac74 --- /dev/null +++ b/tests/testthat/_snaps/gg-plots/titanic-count-toupper.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +NO +YES + + + + + + +1st +2nd +3rd +Crew +Class +toupper(Survived) + +Class + + + + + + + + +1st +2nd +3rd +Crew +titanic-count-toupper + + diff --git a/tests/testthat/_snaps/gg-plots/titanic-count.svg b/tests/testthat/_snaps/gg-plots/titanic-count.svg new file mode 100644 index 000000000..2837a3109 --- /dev/null +++ b/tests/testthat/_snaps/gg-plots/titanic-count.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No +Yes + + + + + + +1st +2nd +3rd +Crew +Class +Survived +titanic-count + + diff --git a/tests/testthat/_snaps/ggbivariate/tips-fill-qual.svg b/tests/testthat/_snaps/ggbivariate/tips-fill-qual.svg new file mode 100644 index 000000000..88080671b --- /dev/null +++ b/tests/testthat/_snaps/ggbivariate/tips-fill-qual.svg @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +21.1% +78.9% +51.7% +48.3% +75.0% +25.0% +72.6% +27.4% + + + + + + + + + + + + + +60.2% +39.8% +66.2% +33.8% + + + + + + + + + + + + + +62.1% +37.9% +61.8% +38.2% + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +day + + + + + + + + + + +time + + + + + + + + + + +sex + + + + + + + + + + +tip + + + + +No +Yes +Fri +Sat +Sun +Thur + + + + +Dinner +Lunch + + +Female +Male + + +2.5 +5.0 +7.5 +10.0 + + + + + +smoker + + + + +No +Yes + + diff --git a/tests/testthat/_snaps/ggbivariate/tips-legend-3.svg b/tests/testthat/_snaps/ggbivariate/tips-legend-3.svg new file mode 100644 index 000000000..340ed16f6 --- /dev/null +++ b/tests/testthat/_snaps/ggbivariate/tips-legend-3.svg @@ -0,0 +1,325 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +62.1% +37.9% +61.8% +38.2% + + + + + + + + + + + + + + + + + +21.1% +78.9% +51.7% +48.3% +75.0% +25.0% +72.6% +27.4% + + + + + + + + + + + + + +60.2% +39.8% +66.2% +33.8% + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +day + + + + + + + + + + +time + + + + + + + + + + +size + + + + +No +Yes +10 +20 +30 +40 +50 + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +Female +Male + + +Fri +Sat +Sun +Thur + + + + +Dinner +Lunch + + +2 +4 +6 + + + + +smoker + + + + + + + + + + +No +Yes + + diff --git a/tests/testthat/_snaps/ggbivariate/tips-legend-default.svg b/tests/testthat/_snaps/ggbivariate/tips-legend-default.svg new file mode 100644 index 000000000..340ed16f6 --- /dev/null +++ b/tests/testthat/_snaps/ggbivariate/tips-legend-default.svg @@ -0,0 +1,325 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +62.1% +37.9% +61.8% +38.2% + + + + + + + + + + + + + + + + + +21.1% +78.9% +51.7% +48.3% +75.0% +25.0% +72.6% +27.4% + + + + + + + + + + + + + +60.2% +39.8% +66.2% +33.8% + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +day + + + + + + + + + + +time + + + + + + + + + + +size + + + + +No +Yes +10 +20 +30 +40 +50 + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +Female +Male + + +Fri +Sat +Sun +Thur + + + + +Dinner +Lunch + + +2 +4 +6 + + + + +smoker + + + + + + + + + + +No +Yes + + diff --git a/tests/testthat/_snaps/ggbivariate/tips-numeric.svg b/tests/testthat/_snaps/ggbivariate/tips-numeric.svg new file mode 100644 index 000000000..3edde2548 --- /dev/null +++ b/tests/testthat/_snaps/ggbivariate/tips-numeric.svg @@ -0,0 +1,846 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +day + + + + + + + + + + +time + + + + + + + + + + +size + + + + + + +2.5 +5.0 +7.5 +10.0 +10 +20 +30 +40 +50 + + + + + +Male +Female + + +Yes +No + + +Thur +Sun +Sat +Fri + + + + +Lunch +Dinner + + +2 +4 +6 + + + +tip + + diff --git a/tests/testthat/_snaps/ggbivariate/tips-rowbar.svg b/tests/testthat/_snaps/ggbivariate/tips-rowbar.svg new file mode 100644 index 000000000..a1c86c614 --- /dev/null +++ b/tests/testthat/_snaps/ggbivariate/tips-rowbar.svg @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +21.1% +78.9% +51.7% +48.3% +75.0% +25.0% +72.6% +27.4% + + + + + + + + + + + + + +60.2% +39.8% +66.2% +33.8% + + + + + + + + + + + + + +62.07% +37.93% +61.78% +38.22% + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +day + + + + + + + + + + +time + + + + + + + + + + +sex + + + + + + + + + + +tip + + + + +No +Yes +Fri +Sat +Sun +Thur + + + + +Dinner +Lunch + + +Female +Male + + +2.5 +5.0 +7.5 +10.0 + + + + + +smoker + + + + +No +Yes + + diff --git a/tests/testthat/_snaps/ggbivariate/tips-title.svg b/tests/testthat/_snaps/ggbivariate/tips-title.svg new file mode 100644 index 000000000..9869ca0a4 --- /dev/null +++ b/tests/testthat/_snaps/ggbivariate/tips-title.svg @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +21.1% +78.9% +51.7% +48.3% +75.0% +25.0% +72.6% +27.4% + + + + + + + + + + + + + +60.2% +39.8% +66.2% +33.8% + + + + + + + + + + + + + +62.1% +37.9% +61.8% +38.2% + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +day + + + + + + + + + + +time + + + + + + + + + + +sex + + + + + + + + + + +tip + + + + +No +Yes +Fri +Sat +Sun +Thur + + + + +Dinner +Lunch + + +Female +Male + + +2.5 +5.0 +7.5 +10.0 + + + + + +Smoker ? + + + + +No +Yes +Custom title + + diff --git a/tests/testthat/_snaps/ggbivariate/tips.svg b/tests/testthat/_snaps/ggbivariate/tips.svg new file mode 100644 index 000000000..de085228d --- /dev/null +++ b/tests/testthat/_snaps/ggbivariate/tips.svg @@ -0,0 +1,209 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +21.1% +78.9% +51.7% +48.3% +75.0% +25.0% +72.6% +27.4% + + + + + + + + + + + + + +60.2% +39.8% +66.2% +33.8% + + + + + + + + + + + + + +62.1% +37.9% +61.8% +38.2% + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +day + + + + + + + + + + +time + + + + + + + + + + +sex + + + + + + + + + + +tip + + + + +No +Yes +Fri +Sat +Sun +Thur + + + + +Dinner +Lunch + + +Female +Male + + +2.5 +5.0 +7.5 +10.0 + + + + + +smoker + + + + +No +Yes + + diff --git a/tests/testthat/_snaps/ggbivariate/titanic-weight-freq.svg b/tests/testthat/_snaps/ggbivariate/titanic-weight-freq.svg new file mode 100644 index 000000000..1c240f095 --- /dev/null +++ b/tests/testthat/_snaps/ggbivariate/titanic-weight-freq.svg @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +37.5% +62.5% +58.6% +41.4% +74.8% +25.2% +76.0% +24.0% + + + + + + + + + + + + + +78.8% +21.2% +26.8% +73.2% + + + + + + + + + + + + + +47.7% +52.3% +68.7% +31.3% + + + + + + + + + + + + + + + + + + + +Class + + + + + + + + + + +Sex + + + + + + + + + + +Age + + +1st +2nd +3rd +Crew + + + + +Male +Female + + +Child +Adult + + + +Survived + + + + +No +Yes + + diff --git a/tests/testthat/_snaps/ggcoef/lm-expo-blue.svg b/tests/testthat/_snaps/ggcoef/lm-expo-blue.svg new file mode 100644 index 000000000..823622653 --- /dev/null +++ b/tests/testthat/_snaps/ggcoef/lm-expo-blue.svg @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +AgeAdult +Class2nd +Class3rd +ClassCrew +SexFemale + + + + + + + + +0.1 +1.0 +10.0 +estimate +term +lm-expo-blue + + diff --git a/tests/testthat/_snaps/ggcoef/lm-expo.svg b/tests/testthat/_snaps/ggcoef/lm-expo.svg new file mode 100644 index 000000000..b1b477ad3 --- /dev/null +++ b/tests/testthat/_snaps/ggcoef/lm-expo.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +(Intercept) +AgeAdult +Class2nd +Class3rd +ClassCrew +SexFemale + + + + + + + + + +0.1 +1.0 +10.0 +estimate +term +lm-expo + + diff --git a/tests/testthat/_snaps/ggcoef/lm.svg b/tests/testthat/_snaps/ggcoef/lm.svg new file mode 100644 index 000000000..491ad7520 --- /dev/null +++ b/tests/testthat/_snaps/ggcoef/lm.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +(Intercept) +Petal.Length +Petal.Width +Sepal.Width + + + + + + + +0 +1 +2 +estimate +term +lm + + diff --git a/tests/testthat/_snaps/ggcoef_model/contrasts.svg b/tests/testthat/_snaps/ggcoef_model/contrasts.svg new file mode 100644 index 000000000..015d57413 --- /dev/null +++ b/tests/testthat/_snaps/ggcoef_model/contrasts.svg @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +day + + + + + + + + + +time + + + + + + + + + +sex + + + + + + + +-1.0 +-0.5 +0.0 +0.5 +1.0 +Thur (p=0.939) +Sun +Sat (p=0.256) +Fri (p=0.476) +Lunch +Dinner (p=0.408) +Male (p=0.366) +Female +Beta + + + + + +p ≤ 0.05 +p > 0.05 +contrasts + + diff --git a/tests/testthat/_snaps/ggcoef_model/glm-expo-include.svg b/tests/testthat/_snaps/ggcoef_model/glm-expo-include.svg new file mode 100644 index 000000000..c6eb457d7 --- /dev/null +++ b/tests/testthat/_snaps/ggcoef_model/glm-expo-include.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Age + + + + + + + + + +Class + + + + + +0.1 +0.3 +1.0 +Adult (p<0.001***) +Child +Crew (p<0.001***) +3rd (p<0.001***) +2nd (p<0.001***) +1st +OR + + + + + +p ≤ 0.05 +p > 0.05 +glm-expo-include + + diff --git a/tests/testthat/_snaps/ggcoef_model/glm-expo-intercept.svg b/tests/testthat/_snaps/ggcoef_model/glm-expo-intercept.svg new file mode 100644 index 000000000..66eb578d3 --- /dev/null +++ b/tests/testthat/_snaps/ggcoef_model/glm-expo-intercept.svg @@ -0,0 +1,214 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +(Intercept) + + + + + + + + + +Sex + + + + + + + + + +Age + + + + + + + + + +Class + + + + + + + + + +Sex * Age + + + + + +0.1 +1.0 +10.0 + (p<0.001***) +Female (p=0.078) +Male +Adult (p<0.001***) +Child +Crew (p<0.001***) +3rd (p<0.001***) +2nd (p<0.001***) +1st +Female * Adult (p<0.001***) +OR + + + + + +p ≤ 0.05 +p > 0.05 +glm-expo-intercept + + diff --git a/tests/testthat/_snaps/ggcoef_model/glm-expo-no-color-rowstrips.svg b/tests/testthat/_snaps/ggcoef_model/glm-expo-no-color-rowstrips.svg new file mode 100644 index 000000000..9456ce1e6 --- /dev/null +++ b/tests/testthat/_snaps/ggcoef_model/glm-expo-no-color-rowstrips.svg @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Sex + + + + + + + + + +Age + + + + + + + + + +Class + + + + + + + + + +Sex * Age + + + + + +0.1 +1.0 +10.0 +Female (p=0.078) +Male +Adult (p<0.001***) +Child +Crew (p<0.001***) +3rd (p<0.001***) +2nd (p<0.001***) +1st +Female * Adult (p<0.001***) +OR + + + + + +p ≤ 0.05 +p > 0.05 +glm-expo-no-color-rowstrips + + diff --git a/tests/testthat/_snaps/ggcoef_model/glm-expo-no-ref.svg b/tests/testthat/_snaps/ggcoef_model/glm-expo-no-ref.svg new file mode 100644 index 000000000..68e26991a --- /dev/null +++ b/tests/testthat/_snaps/ggcoef_model/glm-expo-no-ref.svg @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Sex + + + + + + + + + +Age + + + + + + + + + +Class + + + + + + + + + +Sex * Age + + + + + +0.1 +1.0 +10.0 +Female / Male +Adult / Child (***) +Crew (***) +3rd (***) +2nd (***) +1st +Female / Male * Adult / Child (***) +OR + + + + + +p ≤ 0.05 +p > 0.05 +glm-expo-no-ref + + diff --git a/tests/testthat/_snaps/ggcoef_model/glm-expo-significance.svg b/tests/testthat/_snaps/ggcoef_model/glm-expo-significance.svg new file mode 100644 index 000000000..c5b8610ab --- /dev/null +++ b/tests/testthat/_snaps/ggcoef_model/glm-expo-significance.svg @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Sex + + + + + + + + + +Age + + + + + + + + + +Class + + + + + + + + + +Sex * Age + + + + + +0.1 +1.0 +10.0 +Female (p=0.078) +Male +Adult (p<0.001***) +Child +Crew (p<0.001***) +3rd (p<0.001***) +2nd (p<0.001***) +1st +Female * Adult (p<0.001***) +OR +glm-expo-significance + + diff --git a/tests/testthat/_snaps/ggcoef_model/glm-expo.svg b/tests/testthat/_snaps/ggcoef_model/glm-expo.svg new file mode 100644 index 000000000..ac66bd1ca --- /dev/null +++ b/tests/testthat/_snaps/ggcoef_model/glm-expo.svg @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Sex + + + + + + + + + +Age + + + + + + + + + +Class + + + + + + + + + +Sex * Age + + + + + +0.1 +1.0 +10.0 +Female (p=0.078) +Male +Adult (p<0.001***) +Child +Crew (p<0.001***) +3rd (p<0.001***) +2nd (p<0.001***) +1st +Female * Adult (p<0.001***) +OR + + + + + +p ≤ 0.05 +p > 0.05 +glm-expo + + diff --git a/tests/testthat/_snaps/ggcoef_model/lm-color-nofacet.svg b/tests/testthat/_snaps/ggcoef_model/lm-color-nofacet.svg new file mode 100644 index 000000000..f7db101a7 --- /dev/null +++ b/tests/testthat/_snaps/ggcoef_model/lm-color-nofacet.svg @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +-0.5 +0.0 +0.5 +1.0 +total_bill (p<0.001***) +Lunch (p=0.808) +Dinner +Thur (p=0.824) +Sun (p=0.715) +Sat (p=0.879) +Fri +Beta + + + + + +p ≤ 0.05 +p > 0.05 + + + + + + + + + + +day +time +total_bill +lm-color-nofacet + + diff --git a/tests/testthat/_snaps/ggcoef_model/lm-labelled.svg b/tests/testthat/_snaps/ggcoef_model/lm-labelled.svg new file mode 100644 index 000000000..d4f794e89 --- /dev/null +++ b/tests/testthat/_snaps/ggcoef_model/lm-labelled.svg @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Day of the week + + + + + + + + + +Lunch or Dinner + + + + + + + + + +Bill's total + + + + + + +-0.5 +0.0 +0.5 +1.0 +Thur (p=0.824) +Sun (p=0.715) +Sat (p=0.879) +Fri +Lunch (p=0.808) +Dinner + (p<0.001***) +Beta + + + + + +p ≤ 0.05 +p > 0.05 +lm-labelled + + diff --git a/tests/testthat/_snaps/ggcoef_model/lm-noguide.svg b/tests/testthat/_snaps/ggcoef_model/lm-noguide.svg new file mode 100644 index 000000000..f14b602ba --- /dev/null +++ b/tests/testthat/_snaps/ggcoef_model/lm-noguide.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +day + + + + + + + + + +time + + + + + + + + + +total_bill + + + + + + +-0.5 +0.0 +0.5 +1.0 +Thur (p=0.824) +Sun (p=0.715) +Sat (p=0.879) +Fri +Lunch (p=0.808) +Dinner + (p<0.001***) +Beta +lm-noguide + + diff --git a/tests/testthat/_snaps/ggcoef_model/lm-variable-labels-facet.svg b/tests/testthat/_snaps/ggcoef_model/lm-variable-labels-facet.svg new file mode 100644 index 000000000..59197bb48 --- /dev/null +++ b/tests/testthat/_snaps/ggcoef_model/lm-variable-labels-facet.svg @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Week day + + + + + + + + + +Time +(lunch or +dinner ?) + + + + + + + + + +Total of +the bill + + + + + + +-0.5 +0.0 +0.5 +1.0 +Thur (p=0.824) +Sun (p=0.715) +Sat (p=0.879) +Fri +Lunch (p=0.808) +Dinner + (p<0.001***) +Beta + + + + + +p ≤ 0.05 +p > 0.05 +lm-variable-labels-facet + + diff --git a/tests/testthat/_snaps/ggcoef_model/lm-variable-labels.svg b/tests/testthat/_snaps/ggcoef_model/lm-variable-labels.svg new file mode 100644 index 000000000..53b3db7a3 --- /dev/null +++ b/tests/testthat/_snaps/ggcoef_model/lm-variable-labels.svg @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Week day + + + + + + + + + +Time (lunch or dinner ?) + + + + + + + + + +Total of the bill + + + + + + +-0.5 +0.0 +0.5 +1.0 +Thur (p=0.824) +Sun (p=0.715) +Sat (p=0.879) +Fri +Lunch (p=0.808) +Dinner + (p<0.001***) +Beta + + + + + +p ≤ 0.05 +p > 0.05 +lm-variable-labels + + diff --git a/tests/testthat/_snaps/ggcoef_model/lm.svg b/tests/testthat/_snaps/ggcoef_model/lm.svg new file mode 100644 index 000000000..77d0cbe0d --- /dev/null +++ b/tests/testthat/_snaps/ggcoef_model/lm.svg @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +day + + + + + + + + + +time + + + + + + + + + +total_bill + + + + + + +-0.5 +0.0 +0.5 +1.0 +Thur (p=0.824) +Sun (p=0.715) +Sat (p=0.879) +Fri +Lunch (p=0.808) +Dinner + (p<0.001***) +Beta + + + + + +p ≤ 0.05 +p > 0.05 +lm + + diff --git a/tests/testthat/_snaps/ggcoef_model/models-faceted.svg b/tests/testthat/_snaps/ggcoef_model/models-faceted.svg new file mode 100644 index 000000000..cdb982ccb --- /dev/null +++ b/tests/testthat/_snaps/ggcoef_model/models-faceted.svg @@ -0,0 +1,504 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Full model + + + + + + + + + +Simplified model + + + + + + + + + +With interaction + + + + + + + + + +Agriculture + + + + + + + + + +Examination + + + + + + + + + +Education + + + + + + + + + +Catholic + + + + + + + + + +Infant.Mortality + + + + + + + + + +Education * Catholic + + + + + + +-1 +0 +1 +2 + + + + +-1 +0 +1 +2 + + + + +-1 +0 +1 +2 +Beta + + + + + +p ≤ 0.05 +p > 0.05 +models-faceted + + diff --git a/tests/testthat/_snaps/ggcoef_model/models.svg b/tests/testthat/_snaps/ggcoef_model/models.svg new file mode 100644 index 000000000..b6513589f --- /dev/null +++ b/tests/testthat/_snaps/ggcoef_model/models.svg @@ -0,0 +1,270 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Agriculture + + + + + + + + + +Examination + + + + + + + + + +Education + + + + + + + + + +Catholic + + + + + + + + + +Infant.Mortality + + + + + + + + + +Education * Catholic + + + + + + +-1 +0 +1 +2 +Beta + + + + + +p ≤ 0.05 +p > 0.05 + + + + + + + + + + + + + +Full model +Simplified model +With interaction +models + + diff --git a/tests/testthat/_snaps/ggcoef_model/multinom-expo.svg b/tests/testthat/_snaps/ggcoef_model/multinom-expo.svg new file mode 100644 index 000000000..32c648d7f --- /dev/null +++ b/tests/testthat/_snaps/ggcoef_model/multinom-expo.svg @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +age + + + + + + + + + +degree + + + + + + + + + +sex + + + + + +1 +2 +3 +graduate +bachelor +junior college +high school +lt high school +female +male +OR + + + + + +p ≤ 0.05 +p > 0.05 + + + + + + + + + +pretty happy +very happy +multinom-expo + + diff --git a/tests/testthat/_snaps/ggcoef_model/multinom-faceted-ylabel.svg b/tests/testthat/_snaps/ggcoef_model/multinom-faceted-ylabel.svg new file mode 100644 index 000000000..480f2dd54 --- /dev/null +++ b/tests/testthat/_snaps/ggcoef_model/multinom-faceted-ylabel.svg @@ -0,0 +1,260 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +pretty happy +(ref: very happy) + + + + + + + + + +NA + + + + + + + + + +age + + + + + + + + + +degree + + + + + + + + + +sex + + + + + +0.0 +0.5 +1.0 + + + +0.0 +0.5 +1.0 +graduate +bachelor +junior college +high school +lt high school +female +male +log(OR) + + + + + +p ≤ 0.05 +p > 0.05 +multinom-faceted-ylabel + + diff --git a/tests/testthat/_snaps/ggcoef_model/multinom-faceted.svg b/tests/testthat/_snaps/ggcoef_model/multinom-faceted.svg new file mode 100644 index 000000000..645a17635 --- /dev/null +++ b/tests/testthat/_snaps/ggcoef_model/multinom-faceted.svg @@ -0,0 +1,259 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +pretty happy + + + + + + + + + +very happy + + + + + + + + + +age + + + + + + + + + +degree + + + + + + + + + +sex + + + + + +0.0 +0.5 +1.0 + + + +0.0 +0.5 +1.0 +graduate +bachelor +junior college +high school +lt high school +female +male +log(OR) + + + + + +p ≤ 0.05 +p > 0.05 +multinom-faceted + + diff --git a/tests/testthat/_snaps/ggcoef_model/poly.svg b/tests/testthat/_snaps/ggcoef_model/poly.svg new file mode 100644 index 000000000..a39366d63 --- /dev/null +++ b/tests/testthat/_snaps/ggcoef_model/poly.svg @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + +day + + + + + + +0 +5 +10 +15 +total_bill³ (p=0.006**) +total_bill² (p=0.986) +total_bill (p<0.001***) +Thur (p=0.864) +Sun (p=0.822) +Sat (p=0.608) +Fri +Beta + + + + + +p ≤ 0.05 +p > 0.05 +poly + + diff --git a/tests/testthat/_snaps/ggcorr/flea-big-limits.svg b/tests/testthat/_snaps/ggcorr/flea-big-limits.svg new file mode 100644 index 000000000..f85cd526c --- /dev/null +++ b/tests/testthat/_snaps/ggcorr/flea-big-limits.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +tars1 +tars2 +head +aede1 +aede2 +aede3 + + + + +-5.0 +-2.5 +0.0 +2.5 +5.0 + + + + + + + + + + +flea-big-limits + + diff --git a/tests/testthat/_snaps/ggcorr/flea-limits.svg b/tests/testthat/_snaps/ggcorr/flea-limits.svg new file mode 100644 index 000000000..17e288f40 --- /dev/null +++ b/tests/testthat/_snaps/ggcorr/flea-limits.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +tars1 +tars2 +head +aede1 +aede2 +aede3 + + + + +-1.0 +-0.5 +0.0 +0.5 +1.0 + + + + + + + + + + +flea-limits + + diff --git a/tests/testthat/_snaps/ggcorr/flea-no-limits.svg b/tests/testthat/_snaps/ggcorr/flea-no-limits.svg new file mode 100644 index 000000000..8966b1ee1 --- /dev/null +++ b/tests/testthat/_snaps/ggcorr/flea-no-limits.svg @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +tars1 +tars2 +head +aede1 +aede2 +aede3 + + + + +-0.50 +-0.25 +0.00 +0.25 +0.50 +0.75 + + + + + + + + + + + + +flea-no-limits + + diff --git a/tests/testthat/_snaps/ggcorr/flea-null-limits.svg b/tests/testthat/_snaps/ggcorr/flea-null-limits.svg new file mode 100644 index 000000000..2c7fa11fd --- /dev/null +++ b/tests/testthat/_snaps/ggcorr/flea-null-limits.svg @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +tars1 +tars2 +head +aede1 +aede2 +aede3 + + + + +-0.50 +-0.25 +0.00 +0.25 +0.50 +0.75 + + + + + + + + + + + + +flea-null-limits + + diff --git a/tests/testthat/_snaps/ggcorr/flea-small-limits.svg b/tests/testthat/_snaps/ggcorr/flea-small-limits.svg new file mode 100644 index 000000000..d70e9e8a0 --- /dev/null +++ b/tests/testthat/_snaps/ggcorr/flea-small-limits.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +tars1 +tars2 +head +aede1 +aede2 +aede3 + + + + +-0.50 +-0.25 +0.00 +0.25 +0.50 + + + + + + + + + + +flea-small-limits + + diff --git a/tests/testthat/_snaps/ggcorr/flea.svg b/tests/testthat/_snaps/ggcorr/flea.svg new file mode 100644 index 000000000..17610730a --- /dev/null +++ b/tests/testthat/_snaps/ggcorr/flea.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +tars1 +tars2 +head +aede1 +aede2 +aede3 + + + + +-1.0 +-0.5 +0.0 +0.5 +1.0 + + + + + + + + + + +flea + + diff --git a/tests/testthat/_snaps/ggcorr/geom-blank.svg b/tests/testthat/_snaps/ggcorr/geom-blank.svg new file mode 100644 index 000000000..4f5641714 --- /dev/null +++ b/tests/testthat/_snaps/ggcorr/geom-blank.svg @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +tars1 +tars2 +head +aede1 +aede2 +aede3 + + +geom-blank + + diff --git a/tests/testthat/_snaps/ggcorr/geom-circle-no-limits.svg b/tests/testthat/_snaps/ggcorr/geom-circle-no-limits.svg new file mode 100644 index 000000000..73aa16a7c --- /dev/null +++ b/tests/testthat/_snaps/ggcorr/geom-circle-no-limits.svg @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +tars1 +tars2 +head +aede1 +aede2 +aede3 + + + + +-0.50 +-0.25 +0.00 +0.25 +0.50 +0.75 + + + + + + + + + + + + +geom-circle-no-limits + + diff --git a/tests/testthat/_snaps/ggcorr/geom-circle.svg b/tests/testthat/_snaps/ggcorr/geom-circle.svg new file mode 100644 index 000000000..de0438ffe --- /dev/null +++ b/tests/testthat/_snaps/ggcorr/geom-circle.svg @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +tars1 +tars2 +head +aede1 +aede2 +aede3 + + + + +-1.0 +-0.5 +0.0 +0.5 +1.0 + + + + + + + + + + +geom-circle + + diff --git a/tests/testthat/_snaps/ggcorr/geom-tile-no-limits.svg b/tests/testthat/_snaps/ggcorr/geom-tile-no-limits.svg new file mode 100644 index 000000000..6e1ce7e6e --- /dev/null +++ b/tests/testthat/_snaps/ggcorr/geom-tile-no-limits.svg @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +tars1 +tars2 +head +aede1 +aede2 +aede3 + + + + +-0.50 +-0.25 +0.00 +0.25 +0.50 +0.75 + + + + + + + + + + + + +geom-tile-no-limits + + diff --git a/tests/testthat/_snaps/ggcorr/geom-tile.svg b/tests/testthat/_snaps/ggcorr/geom-tile.svg new file mode 100644 index 000000000..212a6f907 --- /dev/null +++ b/tests/testthat/_snaps/ggcorr/geom-tile.svg @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +tars1 +tars2 +head +aede1 +aede2 +aede3 + + + + + + +[-1,-0.33] +(-0.33,0.33] +(0.33,1] +geom-tile + + diff --git a/tests/testthat/_snaps/ggcorr/layout-exp.svg b/tests/testthat/_snaps/ggcorr/layout-exp.svg new file mode 100644 index 000000000..587455862 --- /dev/null +++ b/tests/testthat/_snaps/ggcorr/layout-exp.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +tars1 +tars2 +head +aede1 +aede2 +aede3 + + + + +-1.0 +-0.5 +0.0 +0.5 +1.0 + + + + + + + + + + +layout.exp + + diff --git a/tests/testthat/_snaps/ggcorr/method-everything.svg b/tests/testthat/_snaps/ggcorr/method-everything.svg new file mode 100644 index 000000000..1b656c233 --- /dev/null +++ b/tests/testthat/_snaps/ggcorr/method-everything.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +tars1 +tars2 +head +aede1 +aede2 +aede3 + + + + +-1.0 +-0.5 +0.0 +0.5 +1.0 + + + + + + + + + + +method-everything + + diff --git a/tests/testthat/_snaps/ggfacet/factor.svg b/tests/testthat/_snaps/ggfacet/factor.svg new file mode 100644 index 000000000..3682a65e8 --- /dev/null +++ b/tests/testthat/_snaps/ggfacet/factor.svg @@ -0,0 +1,1208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +X1115.0 + + + + + + + + + + +X1120.0 + + + + + + + + + + +X1125.0 + + + + + + + + + + +Glucose + + + + + + + + + + +Ethanol + + + + + + + + +0.0024 +0.0026 +0.0028 +0.0030 +0.0032 +0.0034 + + + + + +0.00325 +0.00350 +0.00375 +0.00400 +0.00425 + + + +0.00425 +0.00450 +0.00475 +0 +25 +50 +75 + + + + +0 +25 +50 +75 + + + + + + diff --git a/tests/testthat/_snaps/ggfacet/pigs.svg b/tests/testthat/_snaps/ggfacet/pigs.svg new file mode 100644 index 000000000..f8a9dee37 --- /dev/null +++ b/tests/testthat/_snaps/ggfacet/pigs.svg @@ -0,0 +1,512 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +gilts + + + + + + + + + + +profit + + + + + + + + + + +s_per_herdsz + + + + + + + + + + +production + + + + + + + + + + +herdsz + + + + +1970 +1975 +80 +100 +120 +140 + + + + +5 +6 +7 +8 + + + + +8 +10 +12 +14 + + + + +2500 +2750 +3000 +3250 +3500 + + + + + +700 +750 +800 +850 +900 + + + + + +time + + diff --git a/tests/testthat/_snaps/gglegend/custom.svg b/tests/testthat/_snaps/gglegend/custom.svg new file mode 100644 index 000000000..ff5eb3b6e --- /dev/null +++ b/tests/testthat/_snaps/gglegend/custom.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + +Species + + + + + + +setosa +versicolor +virginica + + diff --git a/tests/testthat/_snaps/gglegend/internal-legend.svg b/tests/testthat/_snaps/gglegend/internal-legend.svg new file mode 100644 index 000000000..21b35b198 --- /dev/null +++ b/tests/testthat/_snaps/gglegend/internal-legend.svg @@ -0,0 +1,374 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Species + + + + + + +setosa +versicolor +virginica + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Sepal.Length + + + + + + + + + + +Sepal.Width + + + + + + + + + + +Sepal.Length + + + + + + + + + + +Sepal.Width + + + + + + +5 +6 +7 +8 + + + + + + +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 +0.0 +0.4 +0.8 +1.2 + + + + +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 + + + + + + + + diff --git a/tests/testthat/_snaps/gglegend/legend-pm.svg b/tests/testthat/_snaps/gglegend/legend-pm.svg new file mode 100644 index 000000000..86b8955ae --- /dev/null +++ b/tests/testthat/_snaps/gglegend/legend-pm.svg @@ -0,0 +1,374 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Species + + + + + + +setosa +versicolor +virginica + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Sepal.Length + + + + + + + + + + +Sepal.Width + + + + + + + + + + +Sepal.Length + + + + + + + + + + +Sepal.Width + + + + + + +5 +6 +7 +8 + + + + + + +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 +0.0 +0.4 +0.8 +1.2 + + + + +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 + + + + + + + + diff --git a/tests/testthat/_snaps/gglegend/legend.svg b/tests/testthat/_snaps/gglegend/legend.svg new file mode 100644 index 000000000..4532e8e7c --- /dev/null +++ b/tests/testthat/_snaps/gglegend/legend.svg @@ -0,0 +1,218 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 + + + + + + + + + + +5 +6 +7 +8 +Sepal.Length +Sepal.Width + +Species + + + + + + +setosa +versicolor +virginica +legend + + diff --git a/tests/testthat/_snaps/gglegend/plotnew-default.svg b/tests/testthat/_snaps/gglegend/plotnew-default.svg new file mode 100644 index 000000000..2f99c0c04 --- /dev/null +++ b/tests/testthat/_snaps/gglegend/plotnew-default.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + +Species + + + + + + +setosa +versicolor +virginica + + diff --git a/tests/testthat/_snaps/gglegend/points.svg b/tests/testthat/_snaps/gglegend/points.svg new file mode 100644 index 000000000..bd97f03ac --- /dev/null +++ b/tests/testthat/_snaps/gglegend/points.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + +Species + + + + + + +setosa +versicolor +virginica + + diff --git a/tests/testthat/_snaps/gglegend/pos-bottom.svg b/tests/testthat/_snaps/gglegend/pos-bottom.svg new file mode 100644 index 000000000..77bf53298 --- /dev/null +++ b/tests/testthat/_snaps/gglegend/pos-bottom.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + +cut + + + + + + + + + + +Fair +Good +Very Good +Premium +Ideal + + diff --git a/tests/testthat/_snaps/gglegend/pos-left.svg b/tests/testthat/_snaps/gglegend/pos-left.svg new file mode 100644 index 000000000..6af6d9c82 --- /dev/null +++ b/tests/testthat/_snaps/gglegend/pos-left.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + +cut + + + + + + + + + + +Fair +Good +Very Good +Premium +Ideal + + diff --git a/tests/testthat/_snaps/gglegend/pos-right.svg b/tests/testthat/_snaps/gglegend/pos-right.svg new file mode 100644 index 000000000..6af6d9c82 --- /dev/null +++ b/tests/testthat/_snaps/gglegend/pos-right.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + +cut + + + + + + + + + + +Fair +Good +Very Good +Premium +Ideal + + diff --git a/tests/testthat/_snaps/gglegend/pos-top.svg b/tests/testthat/_snaps/gglegend/pos-top.svg new file mode 100644 index 000000000..77bf53298 --- /dev/null +++ b/tests/testthat/_snaps/gglegend/pos-top.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + +cut + + + + + + + + + + +Fair +Good +Very Good +Premium +Ideal + + diff --git a/tests/testthat/_snaps/ggmatrix/blank-1-2-2-1.svg b/tests/testthat/_snaps/ggmatrix/blank-1-2-2-1.svg new file mode 100644 index 000000000..bc81d3999 --- /dev/null +++ b/tests/testthat/_snaps/ggmatrix/blank-1-2-2-1.svg @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + +2.5 +5.0 +7.5 +10.0 +0.00 +0.02 +0.04 + + + + + diff --git a/tests/testthat/_snaps/ggmatrix/blank-1-2.svg b/tests/testthat/_snaps/ggmatrix/blank-1-2.svg new file mode 100644 index 000000000..e4ca1f459 --- /dev/null +++ b/tests/testthat/_snaps/ggmatrix/blank-1-2.svg @@ -0,0 +1,436 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 +0.00 +0.02 +0.04 + + + +2.5 +5.0 +7.5 +10.0 + + + + + + diff --git a/tests/testthat/_snaps/ggmatrix/expression-labels.svg b/tests/testthat/_snaps/ggmatrix/expression-labels.svg new file mode 100644 index 000000000..fcb468fdd --- /dev/null +++ b/tests/testthat/_snaps/ggmatrix/expression-labels.svg @@ -0,0 +1,450 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Corr: +0.676*** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +α +0 + + + + + + + + + + +γ +x ++ +y +z + + + + + + + + + + +α +0 + + + + + + + + + + +γ +x ++ +y +z + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 +0.00 +0.02 +0.04 + + + +2.5 +5.0 +7.5 +10.0 + + + + + + diff --git a/tests/testthat/_snaps/ggmatrix/not-enough-plots.svg b/tests/testthat/_snaps/ggmatrix/not-enough-plots.svg new file mode 100644 index 000000000..ad8d505a4 --- /dev/null +++ b/tests/testthat/_snaps/ggmatrix/not-enough-plots.svg @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Plot #1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Plot #5 + + + + + + + + + + + + + + + + + + + + +Plot #3 + + + + + + + + + + + + + + + + + + + +A + + + + + + + + + + +B + + + + + + + + + + +C + + + + + + + + + + +D + + + + + + + + + + +E + + + + + + + +0.00 +0.25 +0.50 +0.75 +1.00 +0.00 +0.25 +0.50 +0.75 +1.00 + + + + + + + diff --git a/tests/testthat/_snaps/ggmatrix/proportions.svg b/tests/testthat/_snaps/ggmatrix/proportions.svg new file mode 100644 index 000000000..5dfacde79 --- /dev/null +++ b/tests/testthat/_snaps/ggmatrix/proportions.svg @@ -0,0 +1,352 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Corr: -0.118 + setosa: 0.743*** +versicolor: 0.526*** + virginica: 0.457*** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +5 +6 +7 +8 + + + +0.0 +0.5 +1.0 +0.0 +0.4 +0.8 +1.2 + + + + +2.0 +2.5 +3.0 +3.5 +4.0 +4.5 + + + + + + +big plot, small marginals + + diff --git a/tests/testthat/_snaps/ggnostic/custom-y.svg b/tests/testthat/_snaps/ggnostic/custom-y.svg new file mode 100644 index 000000000..7dd6c8801 --- /dev/null +++ b/tests/testthat/_snaps/ggnostic/custom-y.svg @@ -0,0 +1,1476 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +wt*** + + + + + + + + + + +qsec*** + + + + + + + + + + +am* + + + + + + + + + + +mpg + + + + + + + + + + +fitted + + + + + + + + + + +se fit + + + + + + + + + + +resid + + + + + + + + + + +std resid + + + + + + + + + + +sigma + + + + + + + + + + +hat + + + + + + + + + + +cooksd + + + + + + +2 +3 +4 +5 + + + + +16 +18 +20 +22 + + +automatic +manual +10 +15 +20 +25 +30 +35 + + + + + + +10 +15 +20 +25 +30 + + + + + +0.6 +0.8 +1.0 +1.2 + + + + +-5.0 +-2.5 +0.0 +2.5 +5.0 + + + + + +-2 +-1 +0 +1 +2 + + + + + +2.30 +2.35 +2.40 +2.45 +2.50 + + + + + +0.1 +0.2 +0.3 + + + +0.0 +0.1 +0.2 +0.3 + + + + +explanatory variables +diagnostics +lm(formula = mpg ~ wt + qsec + am, data = mtc) + + diff --git a/tests/testthat/_snaps/ggnostic/legend.svg b/tests/testthat/_snaps/ggnostic/legend.svg new file mode 100644 index 000000000..82b75d803 --- /dev/null +++ b/tests/testthat/_snaps/ggnostic/legend.svg @@ -0,0 +1,797 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +wt*** + + + + + + + + + + +qsec*** + + + + + + + + + + +am* + + + + + + + + + + +resid + + + + + + + + + + +sigma + + + + + + + + + + +hat + + + + + + + + + + +cooksd + + + + + + +2 +3 +4 +5 + + + + +16 +18 +20 +22 + + +automatic +manual +-5.0 +-2.5 +0.0 +2.5 +5.0 + + + + + +2.30 +2.35 +2.40 +2.45 +2.50 + + + + + +0.1 +0.2 +0.3 + + + +0.0 +0.1 +0.2 +0.3 + + + + +explanatory variables +diagnostics + +am + + + + + + + + + + +automatic +manual +lm(formula = mpg ~ wt + qsec + am, data = mtc) + + diff --git a/tests/testthat/_snaps/ggscatmat/flea-color.svg b/tests/testthat/_snaps/ggscatmat/flea-color.svg new file mode 100644 index 000000000..242739652 --- /dev/null +++ b/tests/testthat/_snaps/ggscatmat/flea-color.svg @@ -0,0 +1,644 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.77 +0.64 +0.56 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.68 +0.65 +0.77 + + + + + + + + + + + + + + + + + + + + + + + + + +0.72 +0.51 +0.65 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +tars1 + + + + + + + + + + +tars2 + + + + + + + + + + +head + + + + + + + + + + +tars1 + + + + + + + + + + +tars2 + + + + + + + + + + +head + + + + + + + +120 +150 +180 +210 +240 + + + + +110 +120 +130 +140 + + + +45 +50 +55 +120 +150 +180 +210 +240 + + + + + +110 +120 +130 +140 + + + + +45 +50 +55 + + + + +species + + + + + +a + + + + + +a + + + + + +a +Concinna +Heikert. +Heptapot. +flea-color + + diff --git a/tests/testthat/_snaps/ggscatmat/flea-pearson.svg b/tests/testthat/_snaps/ggscatmat/flea-pearson.svg new file mode 100644 index 000000000..d59324de3 --- /dev/null +++ b/tests/testthat/_snaps/ggscatmat/flea-pearson.svg @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.03 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +tars1 + + + + + + + + + + +tars2 + + + + + + + + + + +tars1 + + + + + + + + + + +tars2 + + + + + + + +120 +150 +180 +210 +240 + + + + +110 +120 +130 +140 +125 +150 +175 +200 +225 + + + + + +110 +120 +130 +140 + + + + +flea-pearson + + diff --git a/tests/testthat/_snaps/ggscatmat/flea-rsquare.svg b/tests/testthat/_snaps/ggscatmat/flea-rsquare.svg new file mode 100644 index 000000000..fcc379de0 --- /dev/null +++ b/tests/testthat/_snaps/ggscatmat/flea-rsquare.svg @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +tars1 + + + + + + + + + + +tars2 + + + + + + + + + + +tars1 + + + + + + + + + + +tars2 + + + + + + + +120 +150 +180 +210 +240 + + + + +110 +120 +130 +140 +125 +150 +175 +200 +225 + + + + + +110 +120 +130 +140 + + + + +flea-rsquare + + diff --git a/tests/testthat/_snaps/ggscatmat/flea.svg b/tests/testthat/_snaps/ggscatmat/flea.svg new file mode 100644 index 000000000..161f1e4bb --- /dev/null +++ b/tests/testthat/_snaps/ggscatmat/flea.svg @@ -0,0 +1,300 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.03 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +tars1 + + + + + + + + + + +tars2 + + + + + + + + + + +tars1 + + + + + + + + + + +tars2 + + + + + + + +120 +150 +180 +210 +240 + + + + +110 +120 +130 +140 +125 +150 +175 +200 +225 + + + + + +110 +120 +130 +140 + + + + +flea + + diff --git a/tests/testthat/_snaps/ggsurv/plot-cens-true-blue.svg b/tests/testthat/_snaps/ggsurv/plot-cens-true-blue.svg new file mode 100644 index 000000000..a6170f9a2 --- /dev/null +++ b/tests/testthat/_snaps/ggsurv/plot-cens-true-blue.svg @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.25 +0.50 +0.75 +1.00 + + + + + + + + +0 +200 +400 +Time +Survival + +disease + + + + + + + + +PKD +Other +GN +AN + + diff --git a/tests/testthat/_snaps/ggsurv/plot-cens-true-custom-shape.svg b/tests/testthat/_snaps/ggsurv/plot-cens-true-custom-shape.svg new file mode 100644 index 000000000..c603d4320 --- /dev/null +++ b/tests/testthat/_snaps/ggsurv/plot-cens-true-custom-shape.svg @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.25 +0.50 +0.75 +1.00 + + + + + + + + +0 +200 +400 +Time +Survival + +disease + + + + + + + + +PKD +Other +GN +AN + + diff --git a/tests/testthat/_snaps/ggsurv/plot-cens-true-custom.svg b/tests/testthat/_snaps/ggsurv/plot-cens-true-custom.svg new file mode 100644 index 000000000..94564af84 --- /dev/null +++ b/tests/testthat/_snaps/ggsurv/plot-cens-true-custom.svg @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.25 +0.50 +0.75 +1.00 + + + + + + + + +0 +200 +400 +Time +Survival + +disease + + + + + + + + +PKD +Other +GN +AN + + diff --git a/tests/testthat/_snaps/ggsurv/plot-cens-true.svg b/tests/testthat/_snaps/ggsurv/plot-cens-true.svg new file mode 100644 index 000000000..8378cef93 --- /dev/null +++ b/tests/testthat/_snaps/ggsurv/plot-cens-true.svg @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.00 +0.25 +0.50 +0.75 +1.00 + + + + + + + + +0 +200 +400 +Time +Survival + +disease + + + + + + + + +PKD +Other +GN +AN + + diff --git a/tests/testthat/_snaps/ggtable/lm.svg b/tests/testthat/_snaps/ggtable/lm.svg new file mode 100644 index 000000000..491ad7520 --- /dev/null +++ b/tests/testthat/_snaps/ggtable/lm.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +(Intercept) +Petal.Length +Petal.Width +Sepal.Width + + + + + + + +0 +1 +2 +estimate +term +lm + + diff --git a/tests/testthat/_snaps/ggtable/tips-cells.svg b/tests/testthat/_snaps/ggtable/tips-cells.svg new file mode 100644 index 000000000..8ce29ad3c --- /dev/null +++ b/tests/testthat/_snaps/ggtable/tips-cells.svg @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +21.1% +51.7% +75.0% +72.6% +78.9% +48.3% +25.0% +27.4% + + + + + + + + + + + + + + + + + + +60.2% +66.2% +39.8% +33.8% + + + + + + + + + + + + + + + + + + +62.1% +61.8% +37.9% +38.2% + + + + + + + + + + +smoker + + + + + + + + + + +day + + + + + + + + + + +time + + + + + + + + + + +sex + + +No +Yes +Fri +Sat +Sun +Thur +Dinner +Lunch +Female +Male + + diff --git a/tests/testthat/_snaps/ggtable/tips-continuous.svg b/tests/testthat/_snaps/ggtable/tips-continuous.svg new file mode 100644 index 000000000..10f524740 --- /dev/null +++ b/tests/testthat/_snaps/ggtable/tips-continuous.svg @@ -0,0 +1,254 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +4 +45 +57 +45 +15 +42 +19 +17 + + + + + + + + + + + + + + + + + + +106 +45 +70 +23 + + + + + + + + + + + + + + + + + + +54 +97 +33 +60 + + + + + + + + + +Median: +2.7 +[2-3.5] +Median: +3 +[2-3.7] + + + + + + + + + + +Median: 15.4 [12.1-21.8] +Median: 18.2 [13.9-24.7] +Median: 19.6 [15-25.6] +Median: 16.2 [12.4-20.2] + + + + + + + + + + +Median: 18.4 [14.4-25.3] +Median: 16 [12.2-19.5] + + + + + + + + + + +Median: 16.4 [12.8-21.5] +Median: 18.4 [14-24.7] + + + + + + + + + + + +Corr: +0.676*** + + + + + + + + + + + +smoker + + + + + + + + + + +total_bill + + + + + + + + + + +day + + + + + + + + + + +time + + + + + + + + + + +sex + + + + + + + + + + +tip + + + + +No +Yes + + + + + +10 +20 +30 +40 +50 +Fri +Sat +Sun +Thur +Dinner +Lunch +Female +Male + + diff --git a/tests/testthat/_snaps/ggtable/tips-fill-resid.svg b/tests/testthat/_snaps/ggtable/tips-fill-resid.svg new file mode 100644 index 000000000..80e6a1de7 --- /dev/null +++ b/tests/testthat/_snaps/ggtable/tips-fill-resid.svg @@ -0,0 +1,171 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +4 +45 +57 +45 +15 +42 +19 +17 + + + + + + + + + + + + + + + + + + +106 +45 +70 +23 + + + + + + + + + + + + + + + + + + +54 +97 +33 +60 + + + + + + + + + + +smoker + + + + + + + + + + +day + + + + + + + + + + +time + + + + + + + + + + +sex + + +No +Yes +Fri +Sat +Sun +Thur +Dinner +Lunch +Female +Male + + +-2 +-1 +0 +1 +2 +resid + + + + + + + + + + + + diff --git a/tests/testthat/_snaps/ggtable/tips-fill-std-resid.svg b/tests/testthat/_snaps/ggtable/tips-fill-std-resid.svg new file mode 100644 index 000000000..b6b776f85 --- /dev/null +++ b/tests/testthat/_snaps/ggtable/tips-fill-std-resid.svg @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +4 +45 +57 +45 +15 +42 +19 +17 + + + + + + + + + + + + + + + + + + +106 +45 +70 +23 + + + + + + + + + + + + + + + + + + +54 +97 +33 +60 + + + + + + + + + + +smoker + + + + + + + + + + +day + + + + + + + + + + +time + + + + + + + + + + +sex + + +No +Yes +Fri +Sat +Sun +Thur +Dinner +Lunch +Female +Male + + + + + + +-3 +-2 +2 +3 +std.resid + + diff --git a/tests/testthat/_snaps/ggtable/tips.svg b/tests/testthat/_snaps/ggtable/tips.svg new file mode 100644 index 000000000..77ad7927f --- /dev/null +++ b/tests/testthat/_snaps/ggtable/tips.svg @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +4 +45 +57 +45 +15 +42 +19 +17 + + + + + + + + + + + + + + + + + + +106 +45 +70 +23 + + + + + + + + + + + + + + + + + + +54 +97 +33 +60 + + + + + + + + + + +smoker + + + + + + + + + + +day + + + + + + + + + + +time + + + + + + + + + + +sex + + +No +Yes +Fri +Sat +Sun +Thur +Dinner +Lunch +Female +Male + + diff --git a/tests/testthat/_snaps/ggtable/titanic-weight-freq.svg b/tests/testthat/_snaps/ggtable/titanic-weight-freq.svg new file mode 100644 index 000000000..5ce43d902 --- /dev/null +++ b/tests/testthat/_snaps/ggtable/titanic-weight-freq.svg @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +37.5% +58.6% +74.8% +76.0% +62.5% +41.4% +25.2% +24.0% + + + + + + + + + + + + + + + + + + +78.8% +26.8% +21.2% +73.2% + + + + + + + + + + + + + + + + + + +47.7% +68.7% +52.3% +31.3% + + + + + + + + + + +Survived + + + + + + + + + + +Class + + + + + + + + + + +Sex + + + + + + + + + + +Age + + +No +Yes +1st +2nd +3rd +Crew +Male +Female +Child +Adult + + diff --git a/tests/testthat/_snaps/stat_cross/ex.svg b/tests/testthat/_snaps/stat_cross/ex.svg new file mode 100644 index 000000000..dc98cc98b --- /dev/null +++ b/tests/testthat/_snaps/stat_cross/ex.svg @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No +Yes + + + + + + +1st +2nd +3rd +Crew +Class +Survived + +observed + + + + + + + + + + +200 +300 +400 +500 +600 +ex + + diff --git a/tests/testthat/_snaps/stat_cross/label.svg b/tests/testthat/_snaps/stat_cross/label.svg new file mode 100644 index 000000000..8fa6fd2c2 --- /dev/null +++ b/tests/testthat/_snaps/stat_cross/label.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + +122 +203 +167 +118 +528 +178 +673 +212 + + + +No +Yes + + + + + + +1st +2nd +3rd +Crew +Class +Survived +label + + diff --git a/tests/testthat/_snaps/stat_cross/row-prop.svg b/tests/testthat/_snaps/stat_cross/row-prop.svg new file mode 100644 index 000000000..b09b6a196 --- /dev/null +++ b/tests/testthat/_snaps/stat_cross/row-prop.svg @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +8.65% +16.89% +11.29% +6.81% +30.94% +23.98% +49.12% +52.32% + + + + + + + + + + + + + + + + + + + + + + + +3.17% +40.99% +10.32% +27.03% +84.13% +26.16% +2.38% +5.81% + + + + + + + + + +Male + + + + + + + + + +Female + + +1st +2nd +3rd +Crew +No +Yes +No +Yes +Class +Survived + + + + + +-11.28938 +-3 +-2 +2 +3 +11.28938 +Standardized residuals +row-prop + + diff --git a/tests/testthat/_snaps/stat_cross/shape-22.svg b/tests/testthat/_snaps/stat_cross/shape-22.svg new file mode 100644 index 000000000..603274c26 --- /dev/null +++ b/tests/testthat/_snaps/stat_cross/shape-22.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No +Yes + + + + + + +1st +2nd +3rd +Crew +Class +Survived + + + + + + +-12.59304 +-3 +-2 +2 +3 +12.59304 +std.resid + +observed + + + + + + + + + + +200 +300 +400 +500 +600 +shape-22 + + diff --git a/tests/testthat/_snaps/stat_cross/table-color-fill.svg b/tests/testthat/_snaps/stat_cross/table-color-fill.svg new file mode 100644 index 000000000..b436455c6 --- /dev/null +++ b/tests/testthat/_snaps/stat_cross/table-color-fill.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +54 +97 +33 +60 + + + +Female +Male + + + + +No +Yes +smoker +sex +table-color-fill + + diff --git a/tests/testthat/_snaps/stat_cross/table-fill-steps2.svg b/tests/testthat/_snaps/stat_cross/table-fill-steps2.svg new file mode 100644 index 000000000..12ef3997c --- /dev/null +++ b/tests/testthat/_snaps/stat_cross/table-fill-steps2.svg @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +37.5% +62.5% +58.6% +41.4% +74.8% +25.2% +76.0% +24.0% + + + +No +Yes + + + + + + +1st +2nd +3rd +Crew +Class +Survived + + + + + + +-12.59304 +-3 +-2 +2 +3 +12.59304 +std.resid +table-fill-steps2 + + diff --git a/tests/testthat/_snaps/stat_cross/table-label.svg b/tests/testthat/_snaps/stat_cross/table-label.svg new file mode 100644 index 000000000..5659d4f83 --- /dev/null +++ b/tests/testthat/_snaps/stat_cross/table-label.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +47.4% +52.6% +32.2% +67.8% +23.7% +76.3% +51.6% +48.4% + + + +Female +Male + + + + + + +Fri +Sat +Sun +Thur +day +sex +table-label + + diff --git a/tests/testthat/_snaps/stat_cross/tips-color-equal.svg b/tests/testthat/_snaps/stat_cross/tips-color-equal.svg new file mode 100644 index 000000000..5196fc4f1 --- /dev/null +++ b/tests/testthat/_snaps/stat_cross/tips-color-equal.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +54 +97 +33 +60 + + + +Female +Male + + + + +No +Yes +smoker +sex +tips-color-equal + + diff --git a/tests/testthat/_snaps/stat_cross/tips-diagonal.svg b/tests/testthat/_snaps/stat_cross/tips-diagonal.svg new file mode 100644 index 000000000..663400d71 --- /dev/null +++ b/tests/testthat/_snaps/stat_cross/tips-diagonal.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + +151 +93 + + + +No +Yes + + + + +No +Yes +smoker +smoker +tips-diagonal + + diff --git a/tests/testthat/_snaps/stat_cross/tips-fill-red.svg b/tests/testthat/_snaps/stat_cross/tips-fill-red.svg new file mode 100644 index 000000000..ef230f007 --- /dev/null +++ b/tests/testthat/_snaps/stat_cross/tips-fill-red.svg @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female +Male + + + + +No +Yes +smoker +sex + +observed + + + + + + +40 +60 +80 +tips-fill-red + + diff --git a/tests/testthat/_snaps/stat_cross/tips-label-custom.svg b/tests/testthat/_snaps/stat_cross/tips-label-custom.svg new file mode 100644 index 000000000..966987b65 --- /dev/null +++ b/tests/testthat/_snaps/stat_cross/tips-label-custom.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +22.1% +39.8% +13.5% +24.6% + + + +Female +Male + + + + +No +Yes +smoker +sex +tips-label-custom + + diff --git a/tests/testthat/_snaps/stat_cross/tips-label.svg b/tests/testthat/_snaps/stat_cross/tips-label.svg new file mode 100644 index 000000000..19c35a3c5 --- /dev/null +++ b/tests/testthat/_snaps/stat_cross/tips-label.svg @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +22.1% +39.8% +13.5% +24.6% + + + +Female +Male + + + + +No +Yes +smoker +sex + +observed + + + + + + +40 +60 +80 + +smoker + + + + +No +Yes +tips-label + + diff --git a/tests/testthat/_snaps/stat_cross/tips-red-size16.svg b/tests/testthat/_snaps/stat_cross/tips-red-size16.svg new file mode 100644 index 000000000..f9944c2d9 --- /dev/null +++ b/tests/testthat/_snaps/stat_cross/tips-red-size16.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +54 +97 +33 +60 + + + +Female +Male + + + + +No +Yes +smoker +sex +tips-red-size16 + + diff --git a/tests/testthat/_snaps/stat_cross/tips-sex.svg b/tests/testthat/_snaps/stat_cross/tips-sex.svg new file mode 100644 index 000000000..a788bc953 --- /dev/null +++ b/tests/testthat/_snaps/stat_cross/tips-sex.svg @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female +Male + + + + +No +Yes +smoker +sex + +observed + + + + + + +40 +60 +80 +tips-sex + + diff --git a/tests/testthat/_snaps/stat_cross/tips-shape.svg b/tests/testthat/_snaps/stat_cross/tips-shape.svg new file mode 100644 index 000000000..2d694148d --- /dev/null +++ b/tests/testthat/_snaps/stat_cross/tips-shape.svg @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female +Male + + + + +No +Yes +smoker +sex + +observed + + + + + + +40 +60 +80 +tips-shape + + diff --git a/tests/testthat/_snaps/stat_cross/tips-time-color.svg b/tests/testthat/_snaps/stat_cross/tips-time-color.svg new file mode 100644 index 000000000..66639e972 --- /dev/null +++ b/tests/testthat/_snaps/stat_cross/tips-time-color.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +54 +97 +33 +60 + + + +Female +Male + + + + +No +Yes +smoker +sex + +smoker + +a + +a +No +Yes +tips-time-color + + diff --git a/tests/testthat/_snaps/stat_cross/tips-time.svg b/tests/testthat/_snaps/stat_cross/tips-time.svg new file mode 100644 index 000000000..d258964f4 --- /dev/null +++ b/tests/testthat/_snaps/stat_cross/tips-time.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Dinner +Lunch + + + + + + +Fri +Sat +Sun +Thur +day +time + +observed + + + + + + + + +20 +40 +60 +80 +tips-time + + diff --git a/tests/testthat/_snaps/stat_cross/titanic-fill-steps2.svg b/tests/testthat/_snaps/stat_cross/titanic-fill-steps2.svg new file mode 100644 index 000000000..6d31fba51 --- /dev/null +++ b/tests/testthat/_snaps/stat_cross/titanic-fill-steps2.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No +Yes + + + + + + +1st +2nd +3rd +Crew +Class +Survived + + + + + + +-12.59304 +-3 +-2 +2 +3 +12.59304 +std.resid + +observed + + + + + + + + + + +200 +300 +400 +500 +600 +titanic-fill-steps2 + + diff --git a/tests/testthat/_snaps/stat_prop/ggduo-titanic.svg b/tests/testthat/_snaps/stat_prop/ggduo-titanic.svg new file mode 100644 index 000000000..0d60dc4fe --- /dev/null +++ b/tests/testthat/_snaps/stat_prop/ggduo-titanic.svg @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +78.8% +21.2% +26.8% +73.2% + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +37.5% +62.5% +58.6% +41.4% +74.8% +25.2% +76.0% +24.0% + + + + + + + + + + + + + + + + + + + + + + + + + +47.7% +52.3% +68.7% +31.3% + + + + + + + + + + +Survived + + + + + + + + + + +Sex + + + + + + + + + + +Class + + + + + + + + + + +Age + + + + + + + +0% +25% +50% +75% +100% +Male +Female + + +1st +2nd +3rd +Crew + + + + +Child +Adult + + + +Survived + + + + +No +Yes + + diff --git a/tests/testthat/_snaps/stat_prop/tips-bar-width.svg b/tests/testthat/_snaps/stat_prop/tips-bar-width.svg new file mode 100644 index 000000000..1e70f81fd --- /dev/null +++ b/tests/testthat/_snaps/stat_prop/tips-bar-width.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +35.8% +64.2% +35.5% +64.5% + + + +0% +25% +50% +75% +100% + + + + + + + +No +Yes +smoker + +sex + + + + +Female +Male +tips-bar-width + + diff --git a/tests/testthat/_snaps/stat_prop/tips-color-white.svg b/tests/testthat/_snaps/stat_prop/tips-color-white.svg new file mode 100644 index 000000000..e7cc43cf0 --- /dev/null +++ b/tests/testthat/_snaps/stat_prop/tips-color-white.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +35.8% +64.2% +35.5% +64.5% + + + +0% +25% +50% +75% +100% + + + + + + + +No +Yes +smoker + +sex + + + + +Female +Male +tips-color-white + + diff --git a/tests/testthat/_snaps/stat_prop/tips-label-custom.svg b/tests/testthat/_snaps/stat_prop/tips-label-custom.svg new file mode 100644 index 000000000..9aeca235e --- /dev/null +++ b/tests/testthat/_snaps/stat_prop/tips-label-custom.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +35,76% +64,24% +35,48% +64,52% + + + +0% +25% +50% +75% +100% + + + + + + + +No +Yes +smoker + +sex + + + + +Female +Male +tips-label-custom + + diff --git a/tests/testthat/_snaps/stat_prop/tips-label.svg b/tests/testthat/_snaps/stat_prop/tips-label.svg new file mode 100644 index 000000000..ac8764524 --- /dev/null +++ b/tests/testthat/_snaps/stat_prop/tips-label.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +54 +97 +33 +60 + + + +0% +25% +50% +75% +100% + + + + + + + +No +Yes +smoker + +sex + + + + +Female +Male +tips-label + + diff --git a/tests/testthat/_snaps/stat_prop/tips-size8.svg b/tests/testthat/_snaps/stat_prop/tips-size8.svg new file mode 100644 index 000000000..2ea96f4a3 --- /dev/null +++ b/tests/testthat/_snaps/stat_prop/tips-size8.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +35.8% +64.2% +35.5% +64.5% + + + +0% +25% +50% +75% +100% + + + + + + + +No +Yes +smoker + +sex + + + + +Female +Male +tips-size8 + + diff --git a/tests/testthat/_snaps/stat_prop/tips.svg b/tests/testthat/_snaps/stat_prop/tips.svg new file mode 100644 index 000000000..c7f4a241c --- /dev/null +++ b/tests/testthat/_snaps/stat_prop/tips.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +62.1% +37.9% +61.8% +38.2% + + + +Female +Male + + + + + + + +0% +25% +50% +75% +100% +sex + +smoker + + + + +No +Yes +tips + + diff --git a/tests/testthat/_snaps/stat_prop/titanic-dodge.svg b/tests/testthat/_snaps/stat_prop/titanic-dodge.svg new file mode 100644 index 000000000..fea2994f7 --- /dev/null +++ b/tests/testthat/_snaps/stat_prop/titanic-dodge.svg @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +8.2% +11.2% +35.4% +45.2% +28.6% +16.6% +25.0% +29.8% + + + +0 +200 +400 +600 + + + + + + + + +1st +2nd +3rd +Crew +Class +count + +Survived + + + + +No +Yes +titanic-dodge + + diff --git a/tests/testthat/_snaps/stat_prop/titanic-facet.svg b/tests/testthat/_snaps/stat_prop/titanic-facet.svg new file mode 100644 index 000000000..1f1dc7199 --- /dev/null +++ b/tests/testthat/_snaps/stat_prop/titanic-facet.svg @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +65.6% +34.4% +86.0% +14.0% +82.7% +17.3% +77.7% +22.3% + + + + + + + + + + + + + + + + + + + +2.8% +97.2% +12.3% +87.7% +54.1% +45.9% +13.0% +87.0% + + + + + + + + + + + +Male + + + + + + + + + + +Female + + + + + + +1st +2nd +3rd +Crew + + + + +1st +2nd +3rd +Crew +0.00 +0.25 +0.50 +0.75 +1.00 + + + + + +Class +count + +Survived + + + + +No +Yes +titanic-facet + + diff --git a/tests/testthat/_snaps/stat_prop/titanic-stack.svg b/tests/testthat/_snaps/stat_prop/titanic-stack.svg new file mode 100644 index 000000000..1c39dd08d --- /dev/null +++ b/tests/testthat/_snaps/stat_prop/titanic-stack.svg @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +6% +9% +8% +5% +24% +8% +31% +10% + + + +0 +250 +500 +750 + + + + + + + + +1st +2nd +3rd +Crew +Class +count + +Survived + + + + +No +Yes +titanic-stack + + diff --git a/tests/testthat/_snaps/stat_prop/titanic-stat-prop.svg b/tests/testthat/_snaps/stat_prop/titanic-stat-prop.svg new file mode 100644 index 000000000..acdd0c1dd --- /dev/null +++ b/tests/testthat/_snaps/stat_prop/titanic-stat-prop.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +37.5% +62.5% +58.6% +41.4% +74.8% +25.2% +76.0% +24.0% + + + +1st +2nd +3rd +Crew + + + + + + + + + +0.00 +0.25 +0.50 +0.75 +1.00 +count +Class + +Survived + + + + +No +Yes +titanic-stat-prop + + diff --git a/tests/testthat/_snaps/stat_prop/titanic.svg b/tests/testthat/_snaps/stat_prop/titanic.svg new file mode 100644 index 000000000..ae649a32e --- /dev/null +++ b/tests/testthat/_snaps/stat_prop/titanic.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +37.5% +62.5% +58.6% +41.4% +74.8% +25.2% +76.0% +24.0% + + + +0.00 +0.25 +0.50 +0.75 +1.00 + + + + + + + + + +1st +2nd +3rd +Crew +Class +count + +Survived + + + + +No +Yes +titanic + + diff --git a/tests/testthat/_snaps/stat_weighted_mean/geom-bar-dodge-percent.svg b/tests/testthat/_snaps/stat_weighted_mean/geom-bar-dodge-percent.svg new file mode 100644 index 000000000..6ad45bc41 --- /dev/null +++ b/tests/testthat/_snaps/stat_weighted_mean/geom-bar-dodge-percent.svg @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0% +20% +40% +60% +80% + + + + + + + + + +Fri +Sat +Sun +Thur +day +as.integer(smoker == "Yes") + +sex + + + + +Female +Male +geom-bar-dodge-percent + + diff --git a/tests/testthat/_snaps/stat_weighted_mean/geom-bar-dodge.svg b/tests/testthat/_snaps/stat_weighted_mean/geom-bar-dodge.svg new file mode 100644 index 000000000..bd3ab2a53 --- /dev/null +++ b/tests/testthat/_snaps/stat_weighted_mean/geom-bar-dodge.svg @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +5 +10 +15 +20 + + + + + + + + + +Fri +Sat +Sun +Thur +day +total_bill + +sex + + + + +Female +Male +geom-bar-dodge + + diff --git a/tests/testthat/_snaps/stat_weighted_mean/geom-default.svg b/tests/testthat/_snaps/stat_weighted_mean/geom-default.svg new file mode 100644 index 000000000..d69796559 --- /dev/null +++ b/tests/testthat/_snaps/stat_weighted_mean/geom-default.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +17 +18 +19 +20 +21 + + + + + + + + + +Fri +Sat +Sun +Thur +day +total_bill +geom-default + + diff --git a/tests/testthat/_snaps/stat_weighted_mean/geom-line-grouped.svg b/tests/testthat/_snaps/stat_weighted_mean/geom-line-grouped.svg new file mode 100644 index 000000000..64499f9bc --- /dev/null +++ b/tests/testthat/_snaps/stat_weighted_mean/geom-line-grouped.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +14 +16 +18 +20 +22 + + + + + + + + + +Fri +Sat +Sun +Thur +day +total_bill + +sex + + + + +Female +Male +geom-line-grouped + + diff --git a/tests/testthat/_snaps/stat_weighted_mean/geom-line.svg b/tests/testthat/_snaps/stat_weighted_mean/geom-line.svg new file mode 100644 index 000000000..13cda54b4 --- /dev/null +++ b/tests/testthat/_snaps/stat_weighted_mean/geom-line.svg @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +17 +18 +19 +20 +21 + + + + + + + + + +Fri +Sat +Sun +Thur +day +total_bill +geom-line + + diff --git a/tests/testthat/_snaps/stat_weighted_mean/point.svg b/tests/testthat/_snaps/stat_weighted_mean/point.svg new file mode 100644 index 000000000..5045d3817 --- /dev/null +++ b/tests/testthat/_snaps/stat_weighted_mean/point.svg @@ -0,0 +1,299 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +10 +20 +30 +40 +50 + + + + + + + + + +Fri +Sat +Sun +Thur +day +total_bill +point + + diff --git a/tests/testthat/_snaps/stat_weighted_mean/titanic.svg b/tests/testthat/_snaps/stat_weighted_mean/titanic.svg new file mode 100644 index 000000000..a0224b200 --- /dev/null +++ b/tests/testthat/_snaps/stat_weighted_mean/titanic.svg @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0% +25% +50% +75% +100% + + + + + + + + + +1st +2nd +3rd +Crew +Class +Survived + +Sex + + + + +Male +Female +titanic + + diff --git a/tests/testthat/_snaps/stat_weighted_mean/trends-binary-color.svg b/tests/testthat/_snaps/stat_weighted_mean/trends-binary-color.svg new file mode 100644 index 000000000..494b0d412 --- /dev/null +++ b/tests/testthat/_snaps/stat_weighted_mean/trends-binary-color.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +20% +40% +60% +80% + + + + + + + + +Thur +Fri +Sat +Sun +day + +sex + + + + +Female +Male +trends-binary-color + + diff --git a/tests/testthat/_snaps/stat_weighted_mean/trends-binary.svg b/tests/testthat/_snaps/stat_weighted_mean/trends-binary.svg new file mode 100644 index 000000000..7f32c443c --- /dev/null +++ b/tests/testthat/_snaps/stat_weighted_mean/trends-binary.svg @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +40% +60% +80% + + + + + + + +Thur +Fri +Sat +Sun +day +trends-binary + + diff --git a/tests/testthat/_snaps/stat_weighted_mean/trends-color.svg b/tests/testthat/_snaps/stat_weighted_mean/trends-color.svg new file mode 100644 index 000000000..db4bd97d4 --- /dev/null +++ b/tests/testthat/_snaps/stat_weighted_mean/trends-color.svg @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +12.5 +15.0 +17.5 +20.0 + + + + + + + + +Thur +Fri +Sat +Sun +day +total_bill + +time + + + + +Dinner +Lunch +trends-color + + diff --git a/tests/testthat/_snaps/stat_weighted_mean/trends-incl-zero-false.svg b/tests/testthat/_snaps/stat_weighted_mean/trends-incl-zero-false.svg new file mode 100644 index 000000000..0aee38f16 --- /dev/null +++ b/tests/testthat/_snaps/stat_weighted_mean/trends-incl-zero-false.svg @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +0 +5 +10 +15 +20 + + + + + + + + + +Thur +Fri +Sat +Sun +day +total_bill +trends-incl-zero-false + + diff --git a/tests/testthat/_snaps/stat_weighted_mean/trends-incl-zero-true.svg b/tests/testthat/_snaps/stat_weighted_mean/trends-incl-zero-true.svg new file mode 100644 index 000000000..153f2f468 --- /dev/null +++ b/tests/testthat/_snaps/stat_weighted_mean/trends-incl-zero-true.svg @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +0% +20% +40% +60% +80% + + + + + + + + + +Thur +Fri +Sat +Sun +day +trends-incl-zero-true + + diff --git a/tests/testthat/_snaps/stat_weighted_mean/trends-many-color.svg b/tests/testthat/_snaps/stat_weighted_mean/trends-many-color.svg new file mode 100644 index 000000000..3304a43ad --- /dev/null +++ b/tests/testthat/_snaps/stat_weighted_mean/trends-many-color.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0% +10% +20% +30% +40% + + + + + + + +No +Yes +smoker + +sex + + + + +Female +Male + +day + + + + + + + + +Fri +Sat +Sun +Thur +trends-many-color + + diff --git a/tests/testthat/_snaps/stat_weighted_mean/trends-many.svg b/tests/testthat/_snaps/stat_weighted_mean/trends-many.svg new file mode 100644 index 000000000..acbfa9e7b --- /dev/null +++ b/tests/testthat/_snaps/stat_weighted_mean/trends-many.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +10% +20% +30% +40% + + + + + + +No +Yes +smoker + +day + + + + + + + + +Fri +Sat +Sun +Thur +trends-many + + diff --git a/tests/testthat/_snaps/stat_weighted_mean/trends-size-3.svg b/tests/testthat/_snaps/stat_weighted_mean/trends-size-3.svg new file mode 100644 index 000000000..afb9660f9 --- /dev/null +++ b/tests/testthat/_snaps/stat_weighted_mean/trends-size-3.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +20% +40% +60% +80% + + + + + + + + +Thur +Fri +Sat +Sun +day + +sex + + + + +Female +Male +trends-size-3 + + diff --git a/tests/testthat/_snaps/stat_weighted_mean/trends-titanic.svg b/tests/testthat/_snaps/stat_weighted_mean/trends-titanic.svg new file mode 100644 index 000000000..23c8eb504 --- /dev/null +++ b/tests/testthat/_snaps/stat_weighted_mean/trends-titanic.svg @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +0% +25% +50% +75% +100% + + + + + + + + + +1st +2nd +3rd +Crew +Class + +Sex + + + + +Male +Female +trends-titanic + + diff --git a/tests/testthat/_snaps/stat_weighted_mean/trends.svg b/tests/testthat/_snaps/stat_weighted_mean/trends.svg new file mode 100644 index 000000000..a5368db1d --- /dev/null +++ b/tests/testthat/_snaps/stat_weighted_mean/trends.svg @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + +17 +18 +19 +20 +21 + + + + + + + + + +Thur +Fri +Sat +Sun +day +total_bill +trends + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/axislabels-ggduo-none.svg b/tests/testthat/_snaps/zzz_ggpairs/axislabels-ggduo-none.svg new file mode 100644 index 000000000..a3b667f47 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/axislabels-ggduo-none.svg @@ -0,0 +1,486 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Petal.Width + + + + + + + + + + +Species + + + + + + + + + + +Species + + + + + + + + + + +Sepal.Length + + +axisLabels = none + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/axislabels-ggduo-show.svg b/tests/testthat/_snaps/zzz_ggpairs/axislabels-ggduo-show.svg new file mode 100644 index 000000000..a55530ad9 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/axislabels-ggduo-show.svg @@ -0,0 +1,572 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Petal.Width + + + + + + + + + + +Species + + + + + + + + + + +Species + + + + + + + + + + +Sepal.Length + + + + + + + + +0.0 +0.5 +1.0 +1.5 +2.0 +2.5 + + + + + +0 +10 +20 +30 +40 + + + + + +0 +10 +20 +30 +40 + + + + + +0 +10 +20 +30 +40 +0 +10 +20 +30 +40 +50 + + + + + + +0 +10 +20 +30 +40 +50 + + + + + + +0 +10 +20 +30 +40 +50 + + + + + + +5 +6 +7 +8 + + + + +axisLabels = show + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/axislabels-ggpairs-internal.svg b/tests/testthat/_snaps/zzz_ggpairs/axislabels-ggpairs-internal.svg new file mode 100644 index 000000000..580a7f813 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/axislabels-ggpairs-internal.svg @@ -0,0 +1,1105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +Petal.Length +4 +6 +2 +4 +6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Petal.Width +0.5 +1 +1.5 +2 +2.5 +0 +0.5 +1 +1.5 +2 +2.5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Species +setosa +versicolor +virginica + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Sepal.Length +6 +7 +8 +5 +6 +7 +8 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +axisLabels = internal + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/axislabels-ggpairs-none.svg b/tests/testthat/_snaps/zzz_ggpairs/axislabels-ggpairs-none.svg new file mode 100644 index 000000000..70001e37b --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/axislabels-ggpairs-none.svg @@ -0,0 +1,1134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Petal.Length + + + + + + + + + + +Petal.Width + + + + + + + + + + +Species + + + + + + + + + + +Sepal.Length + + + + + + + + + + +Petal.Length + + + + + + + + + + +Petal.Width + + + + + + + + + + +Species + + + + + + + + + + +Sepal.Length + + +axisLabels = none + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/axislabels-ggpairs-show.svg b/tests/testthat/_snaps/zzz_ggpairs/axislabels-ggpairs-show.svg new file mode 100644 index 000000000..b174a1926 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/axislabels-ggpairs-show.svg @@ -0,0 +1,1240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Petal.Length + + + + + + + + + + +Petal.Width + + + + + + + + + + +Species + + + + + + + + + + +Sepal.Length + + + + + + + + + + +Petal.Length + + + + + + + + + + +Petal.Width + + + + + + + + + + +Species + + + + + + + + + + +Sepal.Length + + + + + +2 +4 +6 + + + + + + +0.0 +0.5 +1.0 +1.5 +2.0 +2.5 + + + + + +0 +10 +20 +30 +40 + + + + + +0 +10 +20 +30 +40 + + + + + +0 +10 +20 +30 +40 + + + + +5 +6 +7 +8 +0.0 +0.1 +0.2 + + + +0.0 +0.5 +1.0 +1.5 +2.0 +2.5 + + + + + + +0 +10 +20 +30 + + + + +0 +10 +20 +30 + + + + +0 +10 +20 +30 + + + + +5 +6 +7 +8 + + + + +axisLabels = show + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggduo-autopoint-autopoint-autopoint-autopointdiag-autopointdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggduo-autopoint-autopoint-autopoint-autopointdiag-autopointdiag.svg new file mode 100644 index 000000000..f44f37dbd --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggduo-autopoint-autopoint-autopoint-autopointdiag-autopointdiag.svg @@ -0,0 +1,3343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + +Female +Male +10 +20 +30 +40 +50 + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +Female +Male + + +No +Yes + + +types = c(cont = autopoint, combo = autopoint, discrete = autopoint) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggduo-blank-denstrip-table-blankdiag-blankdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggduo-blank-denstrip-table-blankdiag-blankdiag.svg new file mode 100644 index 000000000..9ff43bd99 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggduo-blank-denstrip-table-blankdiag-blankdiag.svg @@ -0,0 +1,774 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +87 +157 + + + + + + + + + + + + + + + + + + +54 +33 +97 +60 + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + + +0.0 +2.5 +5.0 +7.5 +10.0 + + +Female +Male + + + + +types = c(cont = blank, combo = ggally_denstrip, discrete = table) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggduo-blank-facetdensitystrip-rowbar-blankdiag-blankdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggduo-blank-facetdensitystrip-rowbar-blankdiag-blankdiag.svg new file mode 100644 index 000000000..004a056fe --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggduo-blank-facetdensitystrip-rowbar-blankdiag-blankdiag.svg @@ -0,0 +1,683 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +100.0% +100.0% + + + + + + + + + + + + + + + + + + + + + + + + + +35.8% +64.2% +35.5% +64.5% + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + + + + +0% +25% +50% +75% +100% +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + +types = c(cont = blank, combo = facetdensitystrip, discrete = rowbar) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-autopoint-autopoint-autopoint-autopointdiag-autopointdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-autopoint-autopoint-autopoint-autopointdiag-autopointdiag.svg new file mode 100644 index 000000000..f8500a773 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-autopoint-autopoint-autopoint-autopointdiag-autopointdiag.svg @@ -0,0 +1,3357 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + +Female +Male +10 +20 +30 +40 +50 + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +Female +Male + + +No +Yes + + + +day + + + + + + + + +Fri +Sat +Sun +Thur +types = c(cont = autopoint, combo = autopoint, discrete = autopoint) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-blank-denstrip-table-blankdiag-blankdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-blank-denstrip-table-blankdiag-blankdiag.svg new file mode 100644 index 000000000..cb167ae75 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-blank-denstrip-table-blankdiag-blankdiag.svg @@ -0,0 +1,789 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +87 +157 + + + + + + + + + + + + + + + + + + +54 +33 +97 +60 + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + + +0.0 +2.5 +5.0 +7.5 +10.0 + + +Female +Male + + + + + + +0.00 +0.03 +0.06 +0.09 +day + + + + + + + + +types = c(cont = blank, combo = ggally_denstrip, discrete = table) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-blank-facetdensitystrip-rowbar-blankdiag-blankdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-blank-facetdensitystrip-rowbar-blankdiag-blankdiag.svg new file mode 100644 index 000000000..65dca9985 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-blank-facetdensitystrip-rowbar-blankdiag-blankdiag.svg @@ -0,0 +1,733 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +100.0% +100.0% + + + + + + + + + + + + + + + + + + + + + + + + + +35.8% +64.2% +35.5% +64.5% + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + + + + +0% +25% +50% +75% +100% +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + + +day + + + + + + + + +Fri +Sat +Sun +Thur +types = c(cont = blank, combo = facetdensitystrip, discrete = rowbar) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-cor-facetdensity-ratio-blankdiag-blankdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-cor-facetdensity-ratio-blankdiag-blankdiag.svg new file mode 100644 index 000000000..d12924417 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-cor-facetdensity-ratio-blankdiag-blankdiag.svg @@ -0,0 +1,758 @@ + + + + + + + + + + + + + + + + + + + + + +Corr: 1.000*** + Fri: 1.000*** + Sat: 1.000*** + Sun: 1.000*** +Thur: 1.000*** + + + + + + + + + + + +Corr: 0.676*** + Fri: 0.772*** + Sat: 0.704*** + Sun: 0.502*** +Thur: 0.812*** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Corr: 0.676*** + Fri: 0.772*** + Sat: 0.704*** + Sun: 0.502*** +Thur: 0.812*** + + + + + + + + + + + +Corr: 1.000*** + Fri: 1.000*** + Sat: 1.000*** + Sun: 1.000*** +Thur: 1.000*** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + + +Female +Male +10 +20 +30 +40 +50 + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + + +day + + + + + + + + +Fri +Sat +Sun +Thur +types = c(cont = cor, combo = facetdensity, discrete = ratio) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-density-box-colbar-densitydiag-bardiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-density-box-colbar-densitydiag-bardiag.svg new file mode 100644 index 000000000..fb474f884 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-density-box-colbar-densitydiag-bardiag.svg @@ -0,0 +1,1026 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +100.0% +100.0% + + + + + + + + + + + + + + + + + + + + + + + + + +62.1% +37.9% +61.8% +38.2% + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + +Female +Male +10 +20 +30 +40 +50 + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +Female + +Male + +No + +Yes + + +day + + + + + + + + + + + + + + + + + + + + +Fri +Sat +Sun +Thur +types = c(cont = density, combo = box, discrete = colbar) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-points-dot-count-bardiag-countdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-points-dot-count-bardiag-countdiag.svg new file mode 100644 index 000000000..54d4d1a0e --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-points-dot-count-bardiag-countdiag.svg @@ -0,0 +1,3083 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + +Female +Male +10 +20 +30 +40 +50 + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +Female + +Male + +No + +Yes + + +day + + + + + + + + +Fri +Sat +Sun +Thur +types = c(cont = points, combo = dot, discrete = count) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-smooth-box-no-facet-cross-blankdiag-tablediag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-smooth-box-no-facet-cross-blankdiag-tablediag.svg new file mode 100644 index 000000000..b74b32f72 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-smooth-box-no-facet-cross-blankdiag-tablediag.svg @@ -0,0 +1,1752 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + +Female +Male +10 +20 +30 +40 +50 + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +Male +Female + + +Yes +No + + + +day + + + + + + + + + + + + + + + + + + + + +Fri +Sat +Sun +Thur +types = c(cont = smooth, combo = box_no_facet, discrete = cross) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-smooth-lm-dot-no-facet-crosstable-blankdiag-blankdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-smooth-lm-dot-no-facet-crosstable-blankdiag-blankdiag.svg new file mode 100644 index 000000000..72f8edfee --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-smooth-lm-dot-no-facet-crosstable-blankdiag-blankdiag.svg @@ -0,0 +1,2947 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +87 +0 +0 +157 + + + + + + + + + + + + + + + + + + +54 +33 +97 +60 + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 +Female +Male +10 +20 +30 +40 +50 + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +Male +Female + + +Yes +No + + + +day + + + + + + + + +Fri +Sat +Sun +Thur +types = c(cont = smooth_lm, combo = dot_no_facet, discrete = crosstable) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-smooth-loess-facethist-facetbar-blankdiag-blankdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-smooth-loess-facethist-facetbar-blankdiag-blankdiag.svg new file mode 100644 index 000000000..a52580c30 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggduo-color-smooth-loess-facethist-facetbar-blankdiag-blankdiag.svg @@ -0,0 +1,3329 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + + +0.0 +2.5 +5.0 +7.5 +10.0 + + +Female +Male +10 +20 +30 +40 +50 + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +0 +5 +10 + + + +0 +5 +10 + + + +0.0 +2.5 +5.0 +7.5 +10.0 +12.5 + + + + + + +0.0 +2.5 +5.0 +7.5 +10.0 +12.5 + + + + + + + +day + + + + + + + + +Fri +Sat +Sun +Thur +types = c(cont = smooth_loess, combo = ggally_facethist, discrete = facetbar) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggduo-cor-facetdensity-ratio-blankdiag-blankdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggduo-cor-facetdensity-ratio-blankdiag-blankdiag.svg new file mode 100644 index 000000000..385f587b5 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggduo-cor-facetdensity-ratio-blankdiag-blankdiag.svg @@ -0,0 +1,696 @@ + + + + + + + + + + + + + + + + + + + + + +Corr: +1.000*** + + + + + + + + + + + +Corr: +0.676*** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Corr: +0.676*** + + + + + + + + + + + +Corr: +1.000*** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + + +Female +Male +10 +20 +30 +40 +50 + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + +types = c(cont = cor, combo = facetdensity, discrete = ratio) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggduo-density-box-colbar-densitydiag-bardiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggduo-density-box-colbar-densitydiag-bardiag.svg new file mode 100644 index 000000000..761ebec59 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggduo-density-box-colbar-densitydiag-bardiag.svg @@ -0,0 +1,794 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +100.0% +100.0% + + + + + + + + + + + + + + + + + + + + + + + + + +62.1% +37.9% +61.8% +38.2% + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + +Female +Male +10 +20 +30 +40 +50 + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +Female + +Male + +No + +Yes + +types = c(cont = density, combo = box, discrete = colbar) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggduo-points-dot-count-bardiag-countdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggduo-points-dot-count-bardiag-countdiag.svg new file mode 100644 index 000000000..dda2d28f4 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggduo-points-dot-count-bardiag-countdiag.svg @@ -0,0 +1,3051 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + +Female +Male +10 +20 +30 +40 +50 + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +Female + +Male + +No + +Yes + +types = c(cont = points, combo = dot, discrete = count) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggduo-smooth-box-no-facet-cross-blankdiag-tablediag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggduo-smooth-box-no-facet-cross-blankdiag-tablediag.svg new file mode 100644 index 000000000..caceac995 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggduo-smooth-box-no-facet-cross-blankdiag-tablediag.svg @@ -0,0 +1,1516 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + +Female +Male +10 +20 +30 +40 +50 + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +Male +Female + + +Yes +No + + +types = c(cont = smooth, combo = box_no_facet, discrete = cross) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggduo-smooth-lm-dot-no-facet-crosstable-blankdiag-blankdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggduo-smooth-lm-dot-no-facet-crosstable-blankdiag-blankdiag.svg new file mode 100644 index 000000000..c45fbe3d0 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggduo-smooth-lm-dot-no-facet-crosstable-blankdiag-blankdiag.svg @@ -0,0 +1,2885 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +87 +0 +0 +157 + + + + + + + + + + + + + + + + + + +54 +33 +97 +60 + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 +Female +Male +10 +20 +30 +40 +50 + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +Male +Female + + +Yes +No + + +types = c(cont = smooth_lm, combo = dot_no_facet, discrete = crosstable) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggduo-smooth-loess-facethist-facetbar-blankdiag-blankdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggduo-smooth-loess-facethist-facetbar-blankdiag-blankdiag.svg new file mode 100644 index 000000000..e0acf07dd --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggduo-smooth-loess-facethist-facetbar-blankdiag-blankdiag.svg @@ -0,0 +1,2187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + + +0.0 +2.5 +5.0 +7.5 +10.0 + + +Female +Male +10 +20 +30 +40 +50 + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +0 +5 +10 + + + +0 +5 +10 + + + +0.0 +2.5 +5.0 +7.5 +10.0 +12.5 + + + + + + +0.0 +2.5 +5.0 +7.5 +10.0 +12.5 + + + + + + +types = c(cont = smooth_loess, combo = ggally_facethist, discrete = facetbar) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggpairs-autopoint-autopoint-autopoint-autopointdiag-autopointdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-autopoint-autopoint-autopoint-autopointdiag-autopointdiag.svg new file mode 100644 index 000000000..fc704774c --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-autopoint-autopoint-autopoint-autopointdiag-autopointdiag.svg @@ -0,0 +1,4404 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + +Female +Male + + +No +Yes +10 +20 +30 +40 +50 + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +Female +Male + + +No +Yes + + +upper = c(cont = autopoint, combo = autopoint, discrete = autopoint); diag = c(cont = autopointDiag, discrete = autopointDiag) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggpairs-blank-denstrip-table-blankdiag-blankdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-blank-denstrip-table-blankdiag-blankdiag.svg new file mode 100644 index 000000000..723b6b154 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-blank-denstrip-table-blankdiag-blankdiag.svg @@ -0,0 +1,1014 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +54 +33 +97 +60 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +54 +97 +33 +60 + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + + +0.0 +2.5 +5.0 +7.5 +10.0 + + +Female +Male + + + + +upper = c(cont = blank, combo = ggally_denstrip, discrete = table); diag = c(cont = blankDiag, discrete = blankDiag) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggpairs-blank-facetdensitystrip-rowbar-blankdiag-blankdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-blank-facetdensitystrip-rowbar-blankdiag-blankdiag.svg new file mode 100644 index 000000000..e8102a82d --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-blank-facetdensitystrip-rowbar-blankdiag-blankdiag.svg @@ -0,0 +1,872 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +35.8% +64.2% +35.5% +64.5% + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +62.1% +37.9% +61.8% +38.2% + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + + + + +0% +25% +50% +75% +100% +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + +upper = c(cont = blank, combo = facetdensitystrip, discrete = rowbar); diag = c(cont = blankDiag, discrete = blankDiag) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-autopoint-autopoint-autopoint-autopointdiag-autopointdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-autopoint-autopoint-autopoint-autopointdiag-autopointdiag.svg new file mode 100644 index 000000000..fa6806afb --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-autopoint-autopoint-autopoint-autopointdiag-autopointdiag.svg @@ -0,0 +1,4418 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + +Female +Male + + +No +Yes +10 +20 +30 +40 +50 + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +Female +Male + + +No +Yes + + + +day + + + + + + + + +Fri +Sat +Sun +Thur +upper = c(cont = autopoint, combo = autopoint, discrete = autopoint); diag = c(cont = autopointDiag, discrete = autopointDiag) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-blank-denstrip-table-blankdiag-blankdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-blank-denstrip-table-blankdiag-blankdiag.svg new file mode 100644 index 000000000..849eb2c9c --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-blank-denstrip-table-blankdiag-blankdiag.svg @@ -0,0 +1,1029 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +54 +33 +97 +60 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +54 +97 +33 +60 + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + + +0.0 +2.5 +5.0 +7.5 +10.0 + + +Female +Male + + + + + + +0.00 +0.03 +0.06 +0.09 +day + + + + + + + + +upper = c(cont = blank, combo = ggally_denstrip, discrete = table); diag = c(cont = blankDiag, discrete = blankDiag) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-blank-facetdensitystrip-rowbar-blankdiag-blankdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-blank-facetdensitystrip-rowbar-blankdiag-blankdiag.svg new file mode 100644 index 000000000..4b2ea5f31 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-blank-facetdensitystrip-rowbar-blankdiag-blankdiag.svg @@ -0,0 +1,934 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +35.8% +64.2% +35.5% +64.5% + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +62.1% +37.9% +61.8% +38.2% + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + + + + +0% +25% +50% +75% +100% +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + + +day + + + + + + + + +Fri +Sat +Sun +Thur +upper = c(cont = blank, combo = facetdensitystrip, discrete = rowbar); diag = c(cont = blankDiag, discrete = blankDiag) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-cor-facetdensity-ratio-blankdiag-blankdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-cor-facetdensity-ratio-blankdiag-blankdiag.svg new file mode 100644 index 000000000..a2241dbba --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-cor-facetdensity-ratio-blankdiag-blankdiag.svg @@ -0,0 +1,933 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Corr: 0.676*** + Fri: 0.772*** + Sat: 0.704*** + Sun: 0.502*** +Thur: 0.812*** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Corr: 0.676*** + Fri: 0.772*** + Sat: 0.704*** + Sun: 0.502*** +Thur: 0.812*** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + + +Female +Male +2.5 +5.0 +7.5 +10.0 + + + + +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + + +day + + + + + + + + +Fri +Sat +Sun +Thur +upper = c(cont = cor, combo = facetdensity, discrete = ratio); diag = c(cont = blankDiag, discrete = blankDiag) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-density-box-colbar-densitydiag-bardiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-density-box-colbar-densitydiag-bardiag.svg new file mode 100644 index 000000000..722d8ea14 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-density-box-colbar-densitydiag-bardiag.svg @@ -0,0 +1,1261 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +62.1% +37.9% +61.8% +38.2% + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +35.8% +64.2% +35.5% +64.5% + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + +Female +Male + + +No +Yes +0.00 +0.02 +0.04 +0.06 + + + + +2.5 +5.0 +7.5 +10.0 + + + + +Female + +Male + +No + +Yes + + +day + + + + + + + + + + + + + + + + + + + + +Fri +Sat +Sun +Thur +upper = c(cont = density, combo = box, discrete = colbar); diag = c(cont = densityDiag, discrete = barDiag) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-points-dot-count-bardiag-countdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-points-dot-count-bardiag-countdiag.svg new file mode 100644 index 000000000..2b7b45825 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-points-dot-count-bardiag-countdiag.svg @@ -0,0 +1,3507 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + +Female +Male + + +No +Yes +0 +5 +10 +15 +20 + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +Female + +Male + +No + +Yes + + +day + + + + + + + + +Fri +Sat +Sun +Thur +upper = c(cont = points, combo = dot, discrete = count); diag = c(cont = ggally_barDiag, discrete = countDiag) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-smooth-box-no-facet-cross-blankdiag-tablediag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-smooth-box-no-facet-cross-blankdiag-tablediag.svg new file mode 100644 index 000000000..b3223a641 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-smooth-box-no-facet-cross-blankdiag-tablediag.svg @@ -0,0 +1,1372 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +87 +157 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +151 +93 + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + +Female +Male + + +No +Yes +2.5 +5.0 +7.5 +10.0 + + + + +Male +Female + + +Yes +No + + + +day + + + + + + + + + + + + + + + + + + + + +Fri +Sat +Sun +Thur +upper = c(cont = smooth, combo = box_no_facet, discrete = cross); diag = c(cont = blankDiag, discrete = tableDiag) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-smooth-lm-dot-no-facet-crosstable-blankdiag-blankdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-smooth-lm-dot-no-facet-crosstable-blankdiag-blankdiag.svg new file mode 100644 index 000000000..3c7f35c00 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-smooth-lm-dot-no-facet-crosstable-blankdiag-blankdiag.svg @@ -0,0 +1,2938 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +54 +33 +97 +60 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +54 +97 +33 +60 + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 +Female +Male +2.5 +5.0 +7.5 +10.0 + + + + +Male +Female + + +Yes +No + + + +day + + + + + + + + +Fri +Sat +Sun +Thur +upper = c(cont = smooth_lm, combo = dot_no_facet, discrete = crosstable); diag = c(cont = blankDiag, discrete = blankDiag) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-smooth-loess-facethist-facetbar-blankdiag-blankdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-smooth-loess-facethist-facetbar-blankdiag-blankdiag.svg new file mode 100644 index 000000000..b969f876a --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-color-smooth-loess-facethist-facetbar-blankdiag-blankdiag.svg @@ -0,0 +1,3414 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + + +0.0 +2.5 +5.0 +7.5 +10.0 + + +Female +Male +2.5 +5.0 +7.5 +10.0 + + + + +0 +5 +10 + + + +0 +5 +10 + + + +0.0 +2.5 +5.0 +7.5 +10.0 +12.5 + + + + + + +0.0 +2.5 +5.0 +7.5 +10.0 +12.5 + + + + + + + +day + + + + + + + + +Fri +Sat +Sun +Thur +upper = c(cont = smooth_loess, combo = ggally_facethist, discrete = facetbar); diag = c(cont = blankDiag, discrete = blankDiag) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggpairs-cor-facetdensity-ratio-blankdiag-blankdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-cor-facetdensity-ratio-blankdiag-blankdiag.svg new file mode 100644 index 000000000..0adefbfff --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-cor-facetdensity-ratio-blankdiag-blankdiag.svg @@ -0,0 +1,865 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Corr: +0.676*** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Corr: +0.676*** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + + +Female +Male +2.5 +5.0 +7.5 +10.0 + + + + +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + +10 +20 +30 +40 +50 + + + + + +upper = c(cont = cor, combo = facetdensity, discrete = ratio); diag = c(cont = blankDiag, discrete = blankDiag) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggpairs-density-box-colbar-densitydiag-bardiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-density-box-colbar-densitydiag-bardiag.svg new file mode 100644 index 000000000..685a0995f --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-density-box-colbar-densitydiag-bardiag.svg @@ -0,0 +1,974 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +62.1% +37.9% +61.8% +38.2% + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +35.8% +64.2% +35.5% +64.5% + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + +Female +Male + + +No +Yes +0.00 +0.02 +0.04 + + + +2.5 +5.0 +7.5 +10.0 + + + + +Female + +Male + +No + +Yes + +upper = c(cont = density, combo = box, discrete = colbar); diag = c(cont = densityDiag, discrete = barDiag) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggpairs-points-dot-count-bardiag-countdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-points-dot-count-bardiag-countdiag.svg new file mode 100644 index 000000000..b631e6f63 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-points-dot-count-bardiag-countdiag.svg @@ -0,0 +1,3280 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + +Female +Male + + +No +Yes +0 +5 +10 +15 +20 + + + + + +2.5 +5.0 +7.5 +10.0 + + + + +Female + +Male + +No + +Yes + +upper = c(cont = points, combo = dot, discrete = count); diag = c(cont = ggally_barDiag, discrete = countDiag) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggpairs-smooth-box-no-facet-cross-blankdiag-tablediag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-smooth-box-no-facet-cross-blankdiag-tablediag.svg new file mode 100644 index 000000000..49edf24f6 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-smooth-box-no-facet-cross-blankdiag-tablediag.svg @@ -0,0 +1,1100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +87 +157 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +151 +93 + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 + + +Female +Male + + +No +Yes +2.5 +5.0 +7.5 +10.0 + + + + +Male +Female + + +Yes +No + + +upper = c(cont = smooth, combo = box_no_facet, discrete = cross); diag = c(cont = blankDiag, discrete = tableDiag) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggpairs-smooth-lm-dot-no-facet-crosstable-blankdiag-blankdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-smooth-lm-dot-no-facet-crosstable-blankdiag-blankdiag.svg new file mode 100644 index 000000000..c67921ad1 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-smooth-lm-dot-no-facet-crosstable-blankdiag-blankdiag.svg @@ -0,0 +1,2900 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +54 +33 +97 +60 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +54 +97 +33 +60 + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + +2.5 +5.0 +7.5 +10.0 +Female +Male +2.5 +5.0 +7.5 +10.0 + + + + +Male +Female + + +Yes +No + + +upper = c(cont = smooth_lm, combo = dot_no_facet, discrete = crosstable); diag = c(cont = blankDiag, discrete = blankDiag) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/ggpairs-smooth-loess-facethist-facetbar-blankdiag-blankdiag.svg b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-smooth-loess-facethist-facetbar-blankdiag-blankdiag.svg new file mode 100644 index 000000000..018dc597a --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/ggpairs-smooth-loess-facethist-facetbar-blankdiag-blankdiag.svg @@ -0,0 +1,1936 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +total_bill + + + + + + + + + + +tip + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + +10 +20 +30 +40 +50 + + + + + +0.0 +2.5 +5.0 +7.5 +10.0 + + +Female +Male +2.5 +5.0 +7.5 +10.0 + + + + +0 +5 +10 + + + +0 +5 +10 + + + +0.0 +2.5 +5.0 +7.5 +10.0 +12.5 + + + + + + +0.0 +2.5 +5.0 +7.5 +10.0 +12.5 + + + + + + +upper = c(cont = smooth_loess, combo = ggally_facethist, discrete = facetbar); diag = c(cont = blankDiag, discrete = blankDiag) + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/nested-strips-default.svg b/tests/testthat/_snaps/zzz_ggpairs/nested-strips-default.svg new file mode 100644 index 000000000..fcc0c90d3 --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/nested-strips-default.svg @@ -0,0 +1,1145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Fri + + + + + + + + + + +Sat + + + + + + + + + + +Sun + + + + + + + + + + +Thur + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Dinner + + + + + + + + + + +Lunch + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Fri + + + + + + + + + + +Sat + + + + + + + + + + +Sun + + + + + + + + + + +Thur + + + + + + + + + + + + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +day + + + + + + + + + + +time + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +day + + + + + + + + + + +time + + + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/nested-strips-true.svg b/tests/testthat/_snaps/zzz_ggpairs/nested-strips-true.svg new file mode 100644 index 000000000..86641c1af --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/nested-strips-true.svg @@ -0,0 +1,1299 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Fri + + + + + + + + + + +Sat + + + + + + + + + + +Sun + + + + + + + + + + +Thur + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Fri + + + + + + + + + + +Sat + + + + + + + + + + +Sun + + + + + + + + + + +Thur + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Dinner + + + + + + + + + + +Lunch + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Dinner + + + + + + + + + + +Lunch + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Dinner + + + + + + + + + + +Lunch + + + + + + + + + + +Fri + + + + + + + + + + +Sat + + + + + + + + + + +Sun + + + + + + + + + + +Thur + + + + + + + + + + + + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +day + + + + + + + + + + +time + + + + + + + + + + +sex + + + + + + + + + + +smoker + + + + + + + + + + +day + + + + + + + + + + +time + + + + diff --git a/tests/testthat/_snaps/zzz_ggpairs/show-strips.svg b/tests/testthat/_snaps/zzz_ggpairs/show-strips.svg new file mode 100644 index 000000000..3c7683f5f --- /dev/null +++ b/tests/testthat/_snaps/zzz_ggpairs/show-strips.svg @@ -0,0 +1,762 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Female + + + + + + + + + + +Male + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +No + + + + + + + + + + +Yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +sex + + + + + + + + + + +total_bill + + + + + + + + + + +smoker + + + + + + + + + + +sex + + + + + + + + + + +total_bill + + + + + + + + + + +smoker + + + + +Female +Male + + + + + +10 +20 +30 +40 +50 + + +No +Yes +0 +50 +100 +150 + + + + +10 +20 +30 +40 +50 + + + + + +0 +25 +50 +75 +100 + + + + + +0 +25 +50 +75 +100 + + + + + +Axis should line up even if strips are present + + diff --git a/tests/testthat/test-gg-plots.R b/tests/testthat/test-gg-plots.R index 9dcdf7ef6..9fa3ef44a 100644 --- a/tests/testthat/test-gg-plots.R +++ b/tests/testthat/test-gg-plots.R @@ -7,10 +7,6 @@ data(tips, package = "reshape") data(nasa) nas <- subset(nasa, x <= 2 & y == 1) -expect_print <- function(x) { - testthat::expect_silent(print(x)) -} - test_that("denstrip", { expect_message( suppressWarnings(print(ggally_denstrip(tips, mapping = aes_string("sex", "tip")))), @@ -57,7 +53,10 @@ test_that("cor", { ) } - expect_print(ggally_cor(ti, ggplot2::aes(x = total_bill, y = tip, color = I("green")))) + vdiffr::expect_doppelganger( + "cor-green", + ggally_cor(ti, ggplot2::aes(x = total_bill, y = tip, color = I("green"))) + ) ti3 <- ti2 <- ti ti2[2, "total_bill"] <- NA @@ -144,34 +143,31 @@ test_that("cor stars are aligned", { test_that("ggally_statistic handles factors", { - simple_chisq <- function(x, y){ - scales::number(chisq.test(x,y)$p.value, accuracy=.001) + simple_chisq <- function(x, y) { + scales::number(chisq.test(x, y)$p.value, accuracy = .001) } expect_silent({ - p <- ggally_statistic(reshape::tips, aes(x=sex, y=day), text_fn = simple_chisq, title = "Chi^2") + p <- ggally_statistic(reshape::tips, aes(x = sex, y = day), text_fn = simple_chisq, title = "Chi^2") }) }) test_that("rescale", { p <- ggally_densityDiag(tips, mapping = ggplot2::aes(x = day), rescale = FALSE) expect_true(p$labels$y == "density") - expect_print(p) + vdiffr::expect_doppelganger("rescale-false", p) p <- ggally_densityDiag(tips, mapping = ggplot2::aes(x = day), rescale = TRUE) expect_true(! identical(p$labels$y, "density")) - expect_print(p) + vdiffr::expect_doppelganger("rescale-true", p) p <- ggally_barDiag(tips, mapping = ggplot2::aes(x = tip), binwidth = 0.25, rescale = FALSE) expect_true(p$labels$y == "count") - expect_print(p) + vdiffr::expect_doppelganger("rescale-false-binwidth", p) p <- ggally_barDiag(tips, mapping = ggplot2::aes(x = tip), binwidth = 0.25, rescale = TRUE) expect_true(! identical(p$labels$y, "count")) - expect_print(p) - - - + vdiffr::expect_doppelganger("rescale-true-binwidth", p) }) @@ -179,21 +175,21 @@ test_that("rescale", { test_that("shrink", { p <- ggally_smooth_loess(iris, mapping = ggplot2::aes(Sepal.Width, Petal.Length)) expect_true(!is.null(p$coordinates$limits$y)) - expect_print(p) + vdiffr::expect_doppelganger("shrink-true", p) p <- ggally_smooth_loess(iris, mapping = ggplot2::aes(Sepal.Width, Petal.Length), shrink = FALSE) expect_true(is.null(p$coordinates$limits$y)) - expect_print(p) + vdiffr::expect_doppelganger("shrink-false", p) }) test_that("smooth_se", { p <- ggally_smooth_loess(iris, mapping = ggplot2::aes(Sepal.Width, Petal.Length), se = TRUE) expect_equal(p$layers[[2]]$stat_params$se, TRUE) - expect_print(p) + vdiffr::expect_doppelganger("smooth-se-true", p) p <- ggally_smooth_loess(iris, mapping = ggplot2::aes(Sepal.Width, Petal.Length), se = FALSE) expect_equal(p$layers[[2]]$stat_params$se, FALSE) - expect_print(p) + vdiffr::expect_doppelganger("smooth-se-false", p) }) @@ -202,46 +198,46 @@ test_that("ggally_count", { as.data.frame(Titanic), ggplot2::aes(x = Class, y = Survived, weight = Freq) ) - expect_print(p) + vdiffr::expect_doppelganger("titanic-count", p) p <- ggally_count( as.data.frame(Titanic), ggplot2::aes(x = Class, y = Survived, weight = Freq), fill = "red" ) - expect_print(p) + vdiffr::expect_doppelganger("titanic-count-red", p) p <- ggally_count( as.data.frame(Titanic), ggplot2::aes(x = Class, y = Survived, weight = Freq, fill = Sex) ) - expect_print(p) + vdiffr::expect_doppelganger("titanic-count-sex", p) p <- ggally_count( as.data.frame(Titanic), ggplot2::aes(x = Class, y = Survived, weight = Freq, fill = Class) ) - expect_print(p) + vdiffr::expect_doppelganger("titanic-count-class", p) p <- ggally_count( as.data.frame(Titanic), ggplot2::aes(x = Survived, y = interaction(Sex, Age), weight = Freq, fill = Class) ) - expect_print(p) + vdiffr::expect_doppelganger("titanic-count-interaction", p) # check that y character vectors are rendering p <- ggally_count( as.data.frame(Titanic), ggplot2::aes(x = Class, y = toupper(Survived), weight = Freq, fill = Class) ) - expect_print(p) + vdiffr::expect_doppelganger("titanic-count-toupper", p) # check countDiag p <- ggally_countDiag( as.data.frame(Titanic), ggplot2::aes(x = Survived, weight = Freq, fill = Class) ) - expect_print(p) + vdiffr::expect_doppelganger("titanic-count-diag", p) # change size of tiles p <- ggally_count( @@ -249,7 +245,7 @@ test_that("ggally_count", { ggplot2::aes(x = Class, y = Survived, weight = Freq, fill = Class), x.width = .5 ) - expect_print(p) + vdiffr::expect_doppelganger("titanic-count-diag-class", p) # no warnings expected if na.rm = TRUE p <- ggally_count( @@ -257,6 +253,6 @@ test_that("ggally_count", { ggplot2::aes(x = interaction(Class, Age), y = Survived, weight = Freq, fill = Class), na.rm = TRUE ) - expect_print(p) + vdiffr::expect_doppelganger("titanic-count-diag-interaction", p) }) diff --git a/tests/testthat/test-ggbivariate.R b/tests/testthat/test-ggbivariate.R index e49fbe4ee..5dd65ecef 100644 --- a/tests/testthat/test-ggbivariate.R +++ b/tests/testthat/test-ggbivariate.R @@ -1,27 +1,28 @@ context("ggbivariate") test_that("example", { - expect_print <- function(x) { - expect_silent(print(x)) - } skip_if_not_installed("reshape") data(tips, package = "reshape") - expect_print(ggbivariate(tips, "smoker", c("day", "time", "sex", "tip"))) + p <- ggbivariate(tips, "smoker", c("day", "time", "sex", "tip")) + vdiffr::expect_doppelganger("tips", p) # Personalize plot title and legend title - expect_print(ggbivariate( + p <- ggbivariate( tips, "smoker", c("day", "time", "sex", "tip"), title = "Custom title" ) + - labs(fill = "Smoker ?")) + labs(fill = "Smoker ?") + vdiffr::expect_doppelganger("tips-title", p) # Customize fill colour scale - expect_print(ggbivariate(tips, "smoker", c("day", "time", "sex", "tip")) + - scale_fill_brewer(type = "qual")) + p <- ggbivariate(tips, "smoker", c("day", "time", "sex", "tip")) + + scale_fill_brewer(type = "qual") + vdiffr::expect_doppelganger("tips-fill-qual", p) + # Customize labels - expect_print(ggbivariate( + p <- ggbivariate( tips, "smoker", c("day", "time", "sex", "tip"), rowbar_args = list( colour = "white", @@ -29,16 +30,22 @@ test_that("example", { fontface = "bold", label_format = scales::label_percent(accurary = 1) ) - )) + ) + vdiffr::expect_doppelganger("tips-rowbar", p) # Choose the sub-plot from which get legend - expect_print(ggbivariate(tips, "smoker")) - expect_print(ggbivariate(tips, "smoker", legend = 3)) + p <- ggbivariate(tips, "smoker") + vdiffr::expect_doppelganger("tips-legend-default", p) + + ggbivariate(tips, "smoker", legend = 3) + vdiffr::expect_doppelganger("tips-legend-3", p) # Use mapping to indicate weights d <- as.data.frame(Titanic) - expect_print(ggbivariate(d, "Survived", mapping = aes(weight = Freq))) + p <- ggbivariate(d, "Survived", mapping = aes(weight = Freq)) + vdiffr::expect_doppelganger("titanic-weight-freq", p) # outcome can be numerical - expect_print(ggbivariate(tips, outcome = "tip", title = "tip")) + p <- ggbivariate(tips, outcome = "tip", title = "tip") + vdiffr::expect_doppelganger("tips-numeric", p) }) diff --git a/tests/testthat/test-ggcoef.R b/tests/testthat/test-ggcoef.R index 74a115e0e..30880e133 100644 --- a/tests/testthat/test-ggcoef.R +++ b/tests/testthat/test-ggcoef.R @@ -4,21 +4,21 @@ context("ggcoef") suppressMessages(require(broom)) test_that("example", { - expect_print <- function(x) { - expect_silent(print(x)) - } reg <- lm(Sepal.Length ~ Sepal.Width + Petal.Length + Petal.Width, data = iris) - expect_print(ggcoef(reg)) + p <- ggcoef(reg) + vdiffr::expect_doppelganger("lm", p) skip_if_not_installed("MASS") d <- as.data.frame(Titanic) reg2 <- glm(Survived ~ Sex + Age + Class, family = binomial, data = d, weights = d$Freq) - expect_print(ggcoef(reg2, exponentiate = TRUE)) - expect_print(ggcoef( + p <- ggcoef(reg2, exponentiate = TRUE) + vdiffr::expect_doppelganger("lm-expo", p) + p <- ggcoef( reg2, exponentiate = TRUE, exclude_intercept = TRUE, errorbar_height = .2, color = "blue" - )) + ) + vdiffr::expect_doppelganger("lm-expo-blue", p) }) diff --git a/tests/testthat/test-ggcoef_model.R b/tests/testthat/test-ggcoef_model.R index c142c7c2e..3b411e3db 100644 --- a/tests/testthat/test-ggcoef_model.R +++ b/tests/testthat/test-ggcoef_model.R @@ -2,21 +2,15 @@ context("ggcoef_model") test_that("example of ggcoef_model", { skip_if_not_installed("broom.helpers") - expect_print <- function(x) { - expect_error(print(x), NA) - } skip_if_not_installed("reshape") data(tips, package = "reshape") mod_simple <- lm(tip ~ day + time + total_bill, data = tips) - expect_print(ggcoef_model(mod_simple)) + p <- ggcoef_model(mod_simple) + vdiffr::expect_doppelganger("lm", p) - expect_warning( - print( - ggcoef_model(mod_simple, shape_guide = FALSE, colour_guide = FALSE) - ), - NA - ) + p <- ggcoef_model(mod_simple, shape_guide = FALSE, colour_guide = FALSE) + vdiffr::expect_doppelganger("lm-noguide", p) # custom variable labels # you can use to define variable labels before computing model @@ -28,19 +22,21 @@ test_that("example of ggcoef_model", { total_bill = "Bill's total" ) mod_labelled <- lm(tip ~ day + time + total_bill, data = tips_labelled) - expect_print(ggcoef_model(mod_labelled)) + p <- ggcoef_model(mod_labelled) + vdiffr::expect_doppelganger("lm-labelled", p) } - expect_print(ggcoef_model( + p <- ggcoef_model( mod_simple, variable_labels = c( day = "Week day", time = "Time (lunch or dinner ?)", total_bill = "Total of the bill" ) - )) + ) + vdiffr::expect_doppelganger("lm-variable-labels", p) # if labels are too long, you can use 'facet_labeller' to wrap them - expect_print(ggcoef_model( + p <- ggcoef_model( mod_simple, variable_labels = c( day = "Week day", @@ -48,10 +44,13 @@ test_that("example of ggcoef_model", { total_bill = "Total of the bill" ), facet_labeller = label_wrap_gen(10) - )) + ) + vdiffr::expect_doppelganger("lm-variable-labels-facet", p) # do not display variable facets but add colour guide - expect_print(ggcoef_model(mod_simple, facet_row = NULL, colour_guide = TRUE)) + p <- ggcoef_model(mod_simple, facet_row = NULL, colour_guide = TRUE) + vdiffr::expect_doppelganger("lm-color-nofacet", p) + # a logistic regression example d_titanic <- as.data.frame(Titanic) @@ -64,38 +63,47 @@ test_that("example of ggcoef_model", { ) # use 'exponentiate = TRUE' to get the Odds Ratio - expect_print(ggcoef_model(mod_titanic, exponentiate = TRUE)) + p <- ggcoef_model(mod_titanic, exponentiate = TRUE) + vdiffr::expect_doppelganger("glm-expo", p) + # display intercepts - expect_print(ggcoef_model(mod_titanic, exponentiate = TRUE, intercept = TRUE)) + p <- ggcoef_model(mod_titanic, exponentiate = TRUE, intercept = TRUE) + vdiffr::expect_doppelganger("glm-expo-intercept", p) + # display only a subset of terms - expect_print(ggcoef_model(mod_titanic, exponentiate = TRUE, include = c("Age", "Class"))) + p <- ggcoef_model(mod_titanic, exponentiate = TRUE, include = c("Age", "Class")) + vdiffr::expect_doppelganger("glm-expo-include", p) # do not change points' shape based on significance - expect_print(ggcoef_model(mod_titanic, exponentiate = TRUE, significance = NULL)) + p <- ggcoef_model(mod_titanic, exponentiate = TRUE, significance = NULL) + vdiffr::expect_doppelganger("glm-expo-significance", p) # a black and white version - expect_print(ggcoef_model( + p <- ggcoef_model( mod_titanic, exponentiate = TRUE, colour = NULL, stripped_rows = FALSE - )) + ) + vdiffr::expect_doppelganger("glm-expo-no-color-rowstrips", p) # show dichotomous terms on one row - expect_print(ggcoef_model( + p <- ggcoef_model( mod_titanic, exponentiate = TRUE, no_reference_row = broom.helpers::all_dichotomous(), categorical_terms_pattern = "{ifelse(dichotomous, paste0(level, ' / ', reference_level), level)}", show_p_values = FALSE - )) + ) + vdiffr::expect_doppelganger("glm-expo-no-ref", p) # works also with with polynomial terms mod_poly <- lm( tip ~ poly(total_bill, 3) + day, data = tips, ) - expect_print(ggcoef_model(mod_poly)) + p <- ggcoef_model(mod_poly) + vdiffr::expect_doppelganger("poly", p) # or with different type of contrasts # for sum contrasts, the value of the reference term is computed @@ -106,8 +114,8 @@ test_that("example of ggcoef_model", { data = tips, contrasts = list(time = contr.sum, day = contr.treatment(4, base = 3)) ) - expect_print(ggcoef_model(mod2)) - + p <- ggcoef_model(mod2) + vdiffr::expect_doppelganger("contrasts", p) } # Use ggcoef_compare() for comparing several models on the same plot @@ -116,22 +124,27 @@ test_that("example of ggcoef_model", { mod3 <- lm(Fertility ~ Agriculture + Education * Catholic, data = swiss) models <- list("Full model" = mod1, "Simplified model" = mod2, "With interaction" = mod3) - expect_print(ggcoef_compare(models)) - expect_print(ggcoef_compare(models, type = "faceted")) + p <- ggcoef_compare(models) + vdiffr::expect_doppelganger("models", p) + p <- ggcoef_compare(models, type = "faceted") + vdiffr::expect_doppelganger("models-faceted", p) # specific function for nnet::multinom models skip_if_not_installed("nnet") library(nnet) data(happy) mod <- multinom(happy ~ age + degree + sex, data = happy) - expect_print(ggcoef_multinom(mod, exponentiate = TRUE)) - expect_print(ggcoef_multinom(mod, type = "faceted")) - expect_print(ggcoef_multinom( + p <- ggcoef_multinom(mod, exponentiate = TRUE) + vdiffr::expect_doppelganger("multinom-expo", p) + p <- ggcoef_multinom(mod, type = "faceted") + vdiffr::expect_doppelganger("multinom-faceted", p) + p <- ggcoef_multinom( mod, type = "faceted", y.level_label = c( "pretty happy" = "pretty happy\n(ref: very happy)" ) - )) + ) + vdiffr::expect_doppelganger("multinom-faceted-ylabel", p) }) diff --git a/tests/testthat/test-ggcorr.R b/tests/testthat/test-ggcorr.R index 6d8b25158..197cc7ffe 100644 --- a/tests/testthat/test-ggcorr.R +++ b/tests/testthat/test-ggcorr.R @@ -6,13 +6,12 @@ context("ggcorr") data(flea) test_that("limits", { - print(ggcorr(flea[, -1])) - print(ggcorr(flea[, -1], limits = TRUE)) - print(ggcorr(flea[, -1], limits = FALSE)) - print(ggcorr(flea[, -1], limits = NULL)) - print(ggcorr(flea[, -1], limits = c(-5, 5))) - print(ggcorr(flea[, -1], limits = c(-0.5, 0.5))) - expect_true(TRUE) + vdiffr::expect_doppelganger("flea", ggcorr(flea[, -1])) + vdiffr::expect_doppelganger("flea-limits", ggcorr(flea[, -1], limits = TRUE)) + vdiffr::expect_doppelganger("flea-no-limits", ggcorr(flea[, -1], limits = FALSE)) + vdiffr::expect_doppelganger("flea-null-limits", ggcorr(flea[, -1], limits = NULL)) + vdiffr::expect_doppelganger("flea-big-limits", ggcorr(flea[, -1], limits = c(-5, 5))) + vdiffr::expect_doppelganger("flea-small-limits", ggcorr(flea[, -1], limits = c(-0.5, 0.5))) }) test_that("examples", { @@ -67,14 +66,12 @@ test_that("null midpoint", { }) test_that("further options", { - ggcorr(flea[, -1], geom = "circle") - ggcorr(flea[, -1], geom = "circle", limits = FALSE) - ggcorr(flea[, -1], geom = "tile", nbreaks = 3) - ggcorr(flea[, -1], geom = "tile", limits = FALSE) + vdiffr::expect_doppelganger("geom-circle", ggcorr(flea[, -1], geom = "circle")) + vdiffr::expect_doppelganger("geom-circle-no-limits", ggcorr(flea[, -1], geom = "circle", limits = FALSE)) + vdiffr::expect_doppelganger("geom-tile", ggcorr(flea[, -1], geom = "tile", nbreaks = 3)) + vdiffr::expect_doppelganger("geom-tile-no-limits", ggcorr(flea[, -1], geom = "tile", limits = FALSE)) expect_error(ggcorr(flea[, -1], layout.exp = "a"), "incorrect layout.exp") - expect_silent({ - ggcorr(flea[, -1], layout.exp = 1) - }) + vdiffr::expect_doppelganger("layout.exp", ggcorr(flea[, -1], layout.exp = 1)) }) test_that("data.matrix", { @@ -90,13 +87,13 @@ test_that("cor_matrix", { test_that("other geoms", { expect_error(ggcorr(flea[, -1], geom = "hexbin"), "incorrect geom") - expect_silent({ + vdiffr::expect_doppelganger("geom-blank", ggcorr(flea[, -1], geom = "blank") - }) + ) }) test_that("backwards compatibility", { - expect_silent({ + vdiffr::expect_doppelganger("method-everything", ggcorr(flea[, -1], method = "everything") - }) + ) }) diff --git a/tests/testthat/test-ggfacet.R b/tests/testthat/test-ggfacet.R index a055007cf..65384d127 100644 --- a/tests/testthat/test-ggfacet.R +++ b/tests/testthat/test-ggfacet.R @@ -1,50 +1,35 @@ context("ggfacet") -expect_print <- function(p) { - testthat::expect_silent(print(p)) -} - -if (requireNamespace("chemometrics", quietly = TRUE)) { - data(NIR, package = "chemometrics") - NIR_sub <- data.frame(NIR$yGlcEtOH, NIR$xNIR[, 1:3]) - - test_that("warnings", { - expect_warning( - ggfacet(iris, columnsX = 1:5, columnsY = 1), - "1 factor variables are being removed from X columns" - ) - expect_warning( - ggfacet(iris, columnsX = 1, columnsY = 1:5), - "1 factor variables are being removed from Y columns" - ) - }) - - test_that("generally works", { - # factor variables - expect_print( - ggfacet( - NIR_sub, - columnsY = 1:2, columnsX = 3:5, - fn = ggally_smooth_loess - ) +skip_if_not_installed("chemometrics") + +data(NIR, package = "chemometrics") +NIR_sub <- data.frame(NIR$yGlcEtOH, NIR$xNIR[, 1:3]) + +test_that("warnings", { + expect_warning( + ggfacet(iris, columnsX = 1:5, columnsY = 1), + "1 factor variables are being removed from X columns" + ) + expect_warning( + ggfacet(iris, columnsX = 1, columnsY = 1:5), + "1 factor variables are being removed from Y columns" + ) +}) + +test_that("generally works", { + # factor variables + vdiffr::expect_doppelganger( + "factor", + ggfacet( + NIR_sub, + columnsY = 1:2, columnsX = 3:5, + fn = ggally_smooth_loess ) + ) - }) - - test_that("generally works", { - # factor variables - expect_print( - ggfacet( - NIR_sub, - columnsY = 1:2, columnsX = 3:5, - fn = ggally_smooth_loess - ) - ) - - - expect_print( - ggts(pigs, "time", c("gilts", "profit", "s_per_herdsz", "production", "herdsz")) - ) + vdiffr::expect_doppelganger( + "pigs", + ggts(pigs, "time", c("gilts", "profit", "s_per_herdsz", "production", "herdsz")) + ) - }) -} +}) diff --git a/tests/testthat/test-gglegend.R b/tests/testthat/test-gglegend.R index e40bec50e..290e9fe95 100644 --- a/tests/testthat/test-gglegend.R +++ b/tests/testthat/test-gglegend.R @@ -1,16 +1,13 @@ context("gglegend") - -expect_print <- function(p, ...) { - testthat::expect_silent(print(p)) -} +library(ggplot2) test_that("examples", { - library(ggplot2) - histPlot <- ggplot(diamonds, aes(price, fill = cut)) + - geom_histogram(binwidth = 500) + histPlot <- + ggplot(diamonds, aes(price, fill = cut)) + + geom_histogram(binwidth = 500) (right <- histPlot) (bottom <- histPlot + theme(legend.position = "bottom")) @@ -18,34 +15,36 @@ test_that("examples", { (left <- histPlot + theme(legend.position = "left")) - expect_legend <- function(p) { + expect_legend <- function(name, p) { plotLegend <- grab_legend(p) expect_true(inherits(plotLegend, "gtable")) expect_true(inherits(plotLegend, "gTree")) expect_true(inherits(plotLegend, "grob")) - expect_print(plotLegend) + vdiffr::expect_doppelganger(paste0("pos-", name), plotLegend) } - expect_legend(right) - expect_legend(bottom) - expect_legend(top) - expect_legend(left) - + expect_legend("right", right) + expect_legend("bottom", bottom) + expect_legend("top", top) + expect_legend("left", left) }) test_that("legend", { # display regular plot - expect_print( + vdiffr::expect_doppelganger( + "legend", ggally_points(iris, ggplot2::aes(Sepal.Length, Sepal.Width, color = Species)) ) # Make a function that will only print the legend points_legend <- gglegend(ggally_points) - expect_print(points_legend( + l <- points_legend( iris, ggplot2::aes(Sepal.Length, Sepal.Width, color = Species) - )) + ) + vdiffr::expect_doppelganger("points", l) + # produce the sample legend plot, but supply a string that 'wrap' understands same_points_legend <- gglegend("points") @@ -59,7 +58,7 @@ test_that("legend", { p <- custom_legend( iris, ggplot2::aes(Sepal.Length, Sepal.Width, color = Species) ) - expect_print(p) + vdiffr::expect_doppelganger("custom", p) expect_true(inherits(p, "gtable")) expect_true(inherits(p, "gTree")) expect_true(inherits(p, "grob")) @@ -71,8 +70,8 @@ test_that("legend", { mapping = ggplot2::aes(color = Species), upper = list(continuous = gglegend("points")) ) - print(pm) }) + vdiffr::expect_doppelganger("legend-pm", pm) # Use within ggpairs expect_silent({ @@ -81,17 +80,25 @@ test_that("legend", { mapping = ggplot2::aes(color = Species) ) pm[1, 2] <- points_legend(iris, ggplot2::aes(Sepal.Width, Sepal.Length, color = Species)) - print(pm) }) + vdiffr::expect_doppelganger("internal-legend", pm) }) test_that("plotNew", { points_legend <- gglegend(ggally_points) - expect_print(points_legend( - iris, ggplot2::aes(Sepal.Length, Sepal.Width, color = Species) - )) - expect_print(points_legend( - iris, ggplot2::aes(Sepal.Length, Sepal.Width, color = Species) -), plotNew = TRUE) + vdiffr::expect_doppelganger( + "plotNew-default", + points_legend( + iris, ggplot2::aes(Sepal.Length, Sepal.Width, color = Species) + ) + ) + expect_silent( + print( + points_legend( + iris, ggplot2::aes(Sepal.Length, Sepal.Width, color = Species) + ), + plotNew = TRUE + ) + ) }) diff --git a/tests/testthat/test-gglyph.R b/tests/testthat/test-gglyph.R index 04dc69702..a56a80dc0 100644 --- a/tests/testthat/test-gglyph.R +++ b/tests/testthat/test-gglyph.R @@ -20,7 +20,7 @@ do_glyph <- function(...) { do_gg <- function(dt) { - ggplot2::ggplot(dt, ggplot2::aes(gx, gy, group = gid)) + + ggplot2::ggplot(dt, ggplot2::aes(gx, gy, group = gid)) + # nolint add_ref_lines(dt, color = "red", size = 0.5) + add_ref_boxes(dt, color = "blue") + ggplot2::geom_path() + @@ -104,7 +104,7 @@ test_that("fill", { dt <- do_glyph() # idk how to test that polar happened - do_gg_fill <- function(...){ + do_gg_fill <- function(...) { ggplot2::ggplot(dt, ggplot2::aes(gx, gy, group = gid)) + add_ref_lines(dt, color = "red", size = 0.5) + add_ref_boxes(dt, color = "blue", ...) + @@ -127,13 +127,13 @@ test_that("print", { txt <- capture.output(print(dt)) expect_equal(txt[length(txt) - 2], "Cartesian glyphplot: ") expect_equal(txt[length(txt) - 1], " Size: [2.38, 2.37]") - expect_equal(txt[length(txt) - 0], " Major axes: long, lat" ) + expect_equal(txt[length(txt) - 0], " Major axes: long, lat") dt <- do_glyph(polar = TRUE) txt <- capture.output(print(dt)) expect_equal(txt[length(txt) - 2], "Polar glyphplot: ") expect_equal(txt[length(txt) - 1], " Size: [2.38, 2.37]") - expect_equal(txt[length(txt) - 0], " Major axes: long, lat" ) + expect_equal(txt[length(txt) - 0], " Major axes: long, lat") txt <- capture.output(print(rel(0.95))) expect_equal(txt, "[1] 0.95 *") diff --git a/tests/testthat/test-ggmatrix.R b/tests/testthat/test-ggmatrix.R index 1a0f87999..9cd7f02c8 100644 --- a/tests/testthat/test-ggmatrix.R +++ b/tests/testthat/test-ggmatrix.R @@ -2,10 +2,6 @@ context("ggmatrix") data(tips, package = "reshape") -expect_print <- function(x) { - testthat::expect_silent(print(x)) -} - test_that("stops", { expect_error(ggmatrix(plots = matrix(), nrow = 2, ncol = 3), "'plots' must be a list()") @@ -29,7 +25,9 @@ test_that("expression labels", { chars <- c("col1", "col2") exprs <- c("alpha[0]", "gamma[x + y ^ z]") - expect_print(ggpairs(tips, 1:2, columnLabels = exprs, labeller = "label_parsed")) + p <- ggpairs(tips, 1:2, columnLabels = exprs, labeller = "label_parsed") + vdiffr::expect_doppelganger("expression-labels", p) + expect_error(print(ggpairs(tips, 1:2, columnLabels = expression(alpha, beta))), "xAxisLabels") }) @@ -90,7 +88,7 @@ test_that("missing plot", { byrow = TRUE ) # reaches code where there are more cells than plots - print(a) + vdiffr::expect_doppelganger("not-enough-plots", a) expect_equal(a[1, 1]$ggally_check_val, 1) expect_equal(a[1, 3]$ggally_check_val, 3) @@ -119,10 +117,10 @@ test_that("str.ggmatrix", { test_that("blank", { pm <- ggpairs(tips, 1:2) pm[1, 2] <- "blank" - expect_print(pm) + vdiffr::expect_doppelganger("blank-1_2", pm) pm[2, 1] <- NULL - expect_print(pm) + vdiffr::expect_doppelganger("blank-1_2-2_1", pm) expect_equal(length(pm$plots), 4) @@ -145,8 +143,7 @@ test_that("proportions", { yProportions = c(1, 2), title = "big plot, small marginals" ) - - expect_print(pm2) + vdiffr::expect_doppelganger("proportions", pm2) # turn on progress for a quick plot # TODO - turn test back on when it uses message properly diff --git a/tests/testthat/test-ggmatrix_location.R b/tests/testthat/test-ggmatrix_location.R index a35897a88..5a6547b26 100644 --- a/tests/testthat/test-ggmatrix_location.R +++ b/tests/testthat/test-ggmatrix_location.R @@ -28,8 +28,8 @@ test_that("rows work", { pm <- ggpairs(reshape::tips) expect_rows_cols( - ggmatrix_location(pm, rows = c(3,5)), - rows = c(3,5), + ggmatrix_location(pm, rows = c(3, 5)), + rows = c(3, 5), cols = 1:7 ) expect_rows_cols( @@ -53,9 +53,9 @@ test_that("cols work", { pm <- ggpairs(reshape::tips) expect_rows_cols( - ggmatrix_location(pm, cols = c(3,5)), + ggmatrix_location(pm, cols = c(3, 5)), rows = 1:7, - cols = c(3,5) + cols = c(3, 5) ) expect_rows_cols( ggmatrix_location(pm, cols = 1), @@ -119,11 +119,11 @@ test_that("location character", { test_that("location matrix", { pm <- ggpairs(reshape::tips) - to_loc <- subset(expand.grid(row = 1:7, col = 1:7), row %in% c(3,5) | col %in% c(3,5)) + to_loc <- subset(expand.grid(row = 1:7, col = 1:7), row %in% c(3, 5) | col %in% c(3, 5)) mat <- matrix(FALSE, nrow = 7, ncol = 7, byrow = TRUE) - mat[,c(3,5)] <- TRUE - mat[c(3,5), ] <- TRUE + mat[, c(3, 5)] <- TRUE + mat[c(3, 5), ] <- TRUE expect_loc_grid( ggmatrix_location(pm, location = mat), @@ -203,4 +203,3 @@ test_that("location recursion", { expand.grid(row = 1:7, col = 1:7) ) }) - diff --git a/tests/testthat/test-ggnet.R b/tests/testthat/test-ggnet.R index 98249174d..41698039d 100644 --- a/tests/testthat/test-ggnet.R +++ b/tests/testthat/test-ggnet.R @@ -27,8 +27,8 @@ test_that("examples", { ndyads <- x * (x - 1) density <- x / ndyads m <- matrix(0, nrow = x, ncol = x) - dimnames(m) <- list(letters[ 1:x ], letters[ 1:x ]) - m[ row(m) != col(m) ] <- runif(ndyads) < density + dimnames(m) <- list(letters[1:x], letters[1:x]) + m[row(m) != col(m)] <- runif(ndyads) < density m # random undirected network @@ -38,7 +38,7 @@ test_that("examples", { ggnet(n, label = TRUE, alpha = 1, color = "white", segment.color = "black") # random groups - g <- sample(letters[ 1:3 ], 10, replace = TRUE) + g <- sample(letters[1:3], 10, replace = TRUE) # color palette p <- c("a" = "steelblue", "b" = "forestgreen", "c" = "tomato") @@ -179,9 +179,9 @@ test_that("examples", { ### --- test node labels and label sizes - ggnet(n, label = letters[ 1:10 ], color = "white") + ggnet(n, label = letters[1:10], color = "white") ggnet(n, label = "abc", color = "white", label.size = 4, size = 12) - expect_error(ggnet(n, label = letters[ 1:10 ], label.size = "abc"), "incorrect label.size") + expect_error(ggnet(n, label = letters[1:10], label.size = "abc"), "incorrect label.size") ### --- test node placement diff --git a/tests/testthat/test-ggnet2.R b/tests/testthat/test-ggnet2.R index 49d87954c..2a3377087 100644 --- a/tests/testthat/test-ggnet2.R +++ b/tests/testthat/test-ggnet2.R @@ -28,8 +28,8 @@ test_that("examples", { ndyads <- x * (x - 1) density <- x / ndyads m <- matrix(0, nrow = x, ncol = x) - dimnames(m) <- list(letters[ 1:x ], letters[ 1:x ]) - m[ row(m) != col(m) ] <- runif(ndyads) < density + dimnames(m) <- list(letters[1:x], letters[1:x]) + m[row(m) != col(m)] <- runif(ndyads) < density m # random undirected network diff --git a/tests/testthat/test-ggnetworkmap.R b/tests/testthat/test-ggnetworkmap.R index 1c26f938b..9f10bc9ed 100644 --- a/tests/testthat/test-ggnetworkmap.R +++ b/tests/testthat/test-ggnetworkmap.R @@ -34,8 +34,8 @@ flights <- data.frame( flights <- network(flights, directed = TRUE) # add geographic coordinates -flights %v% "lat" <- airports[ network.vertex.names(flights), "lat" ] # nolint -flights %v% "lon" <- airports[ network.vertex.names(flights), "long" ] # nolint +flights %v% "lat" <- airports[network.vertex.names(flights), "lat"] # nolint +flights %v% "lon" <- airports[network.vertex.names(flights), "long"] # nolint # drop isolated airports delete.vertices(flights, which(degree(flights) < 2)) diff --git a/tests/testthat/test-ggnostic.R b/tests/testthat/test-ggnostic.R index 53dab9838..e6c8267f7 100644 --- a/tests/testthat/test-ggnostic.R +++ b/tests/testthat/test-ggnostic.R @@ -1,12 +1,5 @@ context("ggnostic") -expect_print <- function(p) { - testthat::expect_silent({ - print(p) - }) -} - - test_that("fn_switch", { fn1 <- function(data, mapping, ...) { return(1) @@ -52,10 +45,10 @@ test_that("model_beta_label", { test_that("ggnostic mtcars", { - mtc <- mtcars; - mtc$am <- c("0" = "automatic", "1" = "manual")[as.character(mtc$am)]; + mtc <- mtcars + mtc$am <- c("0" = "automatic", "1" = "manual")[as.character(mtc$am)] - mod <- lm(mpg ~ wt + qsec + am, data = mtc); + mod <- lm(mpg ~ wt + qsec + am, data = mtc) continuous_type <- list( .resid = wrap(ggally_nostic_resid, method = "loess"), .std.resid = wrap(ggally_nostic_std_resid, method = "loess") @@ -68,7 +61,7 @@ test_that("ggnostic mtcars", { continuous = continuous_type, progress = FALSE ) - expect_print(pm) + vdiffr::expect_doppelganger("custom-y", pm) pm <- ggnostic( mod, @@ -77,7 +70,7 @@ test_that("ggnostic mtcars", { continuous = continuous_type, progress = FALSE ) - expect_print(pm) + vdiffr::expect_doppelganger("legend", pm) }) diff --git a/tests/testthat/test-ggparcoord.R b/tests/testthat/test-ggparcoord.R index 1b55f5e0b..308eee17e 100644 --- a/tests/testthat/test-ggparcoord.R +++ b/tests/testthat/test-ggparcoord.R @@ -142,7 +142,7 @@ test_that("splineFactor", { expect_equivalent(mapping_string(get("mapping", envir = p$layers[[1]])$y), "spline.y") tmp <- unique(as.numeric(get("data", envir = p$layers[[1]])$ggally_splineFactor)) - expect_true( (tmp == 3) || (tmp == 21) ) + expect_true((tmp == 3) || (tmp == 21)) } p <- ggparcoord( diff --git a/tests/testthat/test-ggscatmat.R b/tests/testthat/test-ggscatmat.R index 3427f24c0..8fa85b869 100644 --- a/tests/testthat/test-ggscatmat.R +++ b/tests/testthat/test-ggscatmat.R @@ -10,19 +10,18 @@ test_that("example", { expect_warning(p <- ggscatmat(flea2, c(1:3)), "Factor variables are omitted in plot") expect_warning(p <- ggscatmat(flea2, c(2:3, 8)), "Factor variables are omitted in plot") expect_true(is.null(p$labels$colour)) - # print(p) + vdiffr::expect_doppelganger("flea", p) p <- ggscatmat(flea, columns = 2:4, color = "species") expect_true(!is.null(p$labels$colour)) - # print(p) - + vdiffr::expect_doppelganger("flea-color", p) }) test_that("corMethod", { - expect_silent({ - p <- ggscatmat(flea, columns = 2:3, corMethod = "pearson") - p <- ggscatmat(flea, columns = 2:3, corMethod = "rsquare") - }) + p <- ggscatmat(flea, columns = 2:3, corMethod = "pearson") + vdiffr::expect_doppelganger("flea-pearson", p) + p <- ggscatmat(flea, columns = 2:3, corMethod = "rsquare") + vdiffr::expect_doppelganger("flea-rsquare", p) }) test_that("stops", { diff --git a/tests/testthat/test-ggsurv.R b/tests/testthat/test-ggsurv.R index 9e47a415d..9aafc9e57 100644 --- a/tests/testthat/test-ggsurv.R +++ b/tests/testthat/test-ggsurv.R @@ -2,17 +2,12 @@ context("ggsurv") suppressMessages(require(survival)) suppressMessages(require(scales)) -data(lung, package = "survival") -data(kidney, package = "survival") +lung <- survival::lung +kidney <- survival::kidney sf.lung <- survival::survfit(Surv(time, status) ~ 1, data = lung) sf.kid <- survival::survfit(Surv(time, status) ~ disease, data = kidney) -expect_print <- function(x) { - testthat::expect_silent(print(x)) -} - - test_that("single", { a <- ggsurv(sf.lung) @@ -127,41 +122,33 @@ test_that("CI", { }) test_that("multiple colors", { - expect_print(ggsurv(sf.kid, plot.cens = TRUE)) + p <- ggsurv(sf.kid, plot.cens = TRUE) + vdiffr::expect_doppelganger("plot-cens-true", p) expect_warning({ ggsurv(sf.kid, plot.cens = TRUE, cens.col = c("red", "blue")) }, "Color scales for censored points") # nolint - expect_silent({ - print( - ggsurv(sf.kid, plot.cens = TRUE, cens.col = "blue") - ) - }) + p <- ggsurv(sf.kid, plot.cens = TRUE, cens.col = "blue") + vdiffr::expect_doppelganger("plot-cens-true-blue", p) - cusotm_color <- c("green", "blue", "purple", "orange") - expect_silent({ - print( - ggsurv(sf.kid, plot.cens = TRUE, cens.col = cusotm_color) - ) - }) + custom_color <- c("green", "blue", "purple", "orange") + p <- ggsurv(sf.kid, plot.cens = TRUE, cens.col = custom_color) + vdiffr::expect_doppelganger("plot-cens-true-custom", p) expect_warning({ ggsurv( sf.kid, plot.cens = TRUE, - cens.col = cusotm_color, + cens.col = custom_color, cens.shape = c(1, 2) ) }, "The length of the censored shapes") # nolint - expect_silent({ - print( - ggsurv( - sf.kid, plot.cens = TRUE, - cens.col = cusotm_color, - cens.shape = c(1, 2, 3, 4) - ) + p <- + ggsurv( + sf.kid, plot.cens = TRUE, + cens.col = custom_color, + cens.shape = c(1, 2, 3, 4) ) - }) - + vdiffr::expect_doppelganger("plot-cens-true-custom-shape", p) }) test_that("cens.size", { @@ -175,18 +162,3 @@ test_that("cens.size", { expect_true(a$layers[[2]]$aes_params$size == 2) expect_true(b$layers[[2]]$aes_params$size != 2) }) - - - - -# 881 R/ggsurv.r 231 231 0 -# 883 R/ggsurv.r 242 242 0 - -# 884 R/ggsurv.r 247 249 0 -# 885 R/ggsurv.r 248 248 0 -# 886 R/ggsurv.r 251 255 0 -# 887 R/ggsurv.r 252 252 0 -# 888 R/ggsurv.r 254 254 0 -# 889 R/ggsurv.r 256 258 0 -# 890 R/ggsurv.r 263 263 0 -# 891 R/ggsurv.r 274 274 0 diff --git a/tests/testthat/test-ggtable.R b/tests/testthat/test-ggtable.R index 13e6bb564..49d339ea1 100644 --- a/tests/testthat/test-ggtable.R +++ b/tests/testthat/test-ggtable.R @@ -3,35 +3,44 @@ context("ggtable") suppressMessages(require(broom)) test_that("example", { - expect_print <- function(x) { - expect_silent(print(x)) - } skip_if_not_installed("reshape") reg <- lm(Sepal.Length ~ Sepal.Width + Petal.Length + Petal.Width, data = iris) - expect_print(ggcoef(reg)) + vdiffr::expect_doppelganger("lm", ggcoef(reg)) data(tips, package = "reshape") - expect_print(ggtable(tips, "smoker", c("day", "time", "sex"))) + vdiffr::expect_doppelganger("tips", ggtable(tips, "smoker", c("day", "time", "sex"))) # displaying row proportions - expect_print(ggtable(tips, "smoker", c("day", "time", "sex"), cells = "row.prop")) + vdiffr::expect_doppelganger("tips-cells", ggtable(tips, "smoker", c("day", "time", "sex"), cells = "row.prop")) # filling cells with residuals - expect_print(ggtable(tips, "smoker", c("day", "time", "sex"), fill = "std.resid", legend = 1)) - expect_print(ggtable(tips, "smoker", c("day", "time", "sex"), fill = "resid", legend = 1)) + vdiffr::expect_doppelganger( + "tips-fill-std_resid", + ggtable(tips, "smoker", c("day", "time", "sex"), fill = "std.resid", legend = 1) + ) + vdiffr::expect_doppelganger( + "tips-fill-resid", + ggtable(tips, "smoker", c("day", "time", "sex"), fill = "resid", legend = 1) + ) # if continuous variables are provided, just displaying some summary statistics - expect_print(ggtable(tips, c("smoker", "total_bill"), c("day", "time", "sex", "tip"))) + vdiffr::expect_doppelganger( + "tips-continuous", + ggtable(tips, c("smoker", "total_bill"), c("day", "time", "sex", "tip")) + ) # specifying weights d <- as.data.frame(Titanic) - expect_print(ggtable( - d, - "Survived", - c("Class", "Sex", "Age"), - mapping = aes(weight = Freq), - cells = "row.prop", - fill = "std.resid" - )) + vdiffr::expect_doppelganger( + "titanic-weight-freq", + ggtable( + d, + "Survived", + c("Class", "Sex", "Age"), + mapping = aes(weight = Freq), + cells = "row.prop", + fill = "std.resid" + ) + ) }) diff --git a/tests/testthat/test-stat_cross.R b/tests/testthat/test-stat_cross.R index 99cdb3397..068b13b7a 100644 --- a/tests/testthat/test-stat_cross.R +++ b/tests/testthat/test-stat_cross.R @@ -1,120 +1,131 @@ context("stat_cross") test_that("example", { - expect_print <- function(x) { - expect_silent(print(x)) - } d <- as.data.frame(Titanic) # plot number of observations - expect_print(ggplot(d) + - aes(x = Class, y = Survived, weight = Freq, size = after_stat(observed)) + - stat_cross() + - scale_size_area(max_size = 20)) + p <- + ggplot(d) + + aes(x = Class, y = Survived, weight = Freq, size = after_stat(observed)) + + stat_cross() + + scale_size_area(max_size = 20) + vdiffr::expect_doppelganger("ex", p) # custom shape and fill colour based on chi-squared residuals - expect_print(ggplot(d) + - aes( - x = Class, y = Survived, weight = Freq, - size = after_stat(observed), fill = after_stat(std.resid) - ) + - stat_cross(shape = 22) + - scale_fill_steps2(breaks = c(-3, -2, 2, 3), show.limits = TRUE) + - scale_size_area(max_size = 20)) + p <- + ggplot(d) + + aes( + x = Class, y = Survived, weight = Freq, + size = after_stat(observed), fill = after_stat(std.resid) + ) + + stat_cross(shape = 22) + + scale_fill_steps2(breaks = c(-3, -2, 2, 3), show.limits = TRUE) + + scale_size_area(max_size = 20) + vdiffr::expect_doppelganger("shape-22", p) # plotting the number of observations as a table - expect_print(ggplot(d) + - aes( - x = Class, y = Survived, weight = Freq, label = after_stat(observed) - ) + - geom_text(stat = "cross")) + p <- + ggplot(d) + + aes( + x = Class, y = Survived, weight = Freq, label = after_stat(observed) + ) + + geom_text(stat = "cross") + vdiffr::expect_doppelganger("label", p) # Row proportions with standardized residuals - expect_print(ggplot(d) + - aes( - x = Class, y = Survived, weight = Freq, - label = scales::percent(after_stat(row.prop)), - size = NULL, fill = after_stat(std.resid) - ) + - stat_cross(shape = 22, size = 30) + - geom_text(stat = "cross") + - scale_fill_steps2(breaks = c(-3, -2, 2, 3), show.limits = TRUE) + - facet_grid(Sex ~ .) + - labs(fill = "Standardized residuals") + - theme_minimal()) + p <- + ggplot(d) + + aes( + x = Class, y = Survived, weight = Freq, + label = scales::percent(after_stat(row.prop)), + size = NULL, fill = after_stat(std.resid) + ) + + stat_cross(shape = 22, size = 30) + + geom_text(stat = "cross") + + scale_fill_steps2(breaks = c(-3, -2, 2, 3), show.limits = TRUE) + + facet_grid(Sex ~ .) + + labs(fill = "Standardized residuals") + + theme_minimal() + vdiffr::expect_doppelganger("row-prop", p) # ggally_cross skip_if_not_installed("reshape") data(tips, package = "reshape") - expect_print(ggally_cross(tips, mapping = aes(x = smoker, y = sex))) - expect_print(ggally_cross(tips, mapping = aes(x = day, y = time))) - # Custom fill - expect_print(ggally_cross(tips, mapping = aes(x = smoker, y = sex), fill = "red")) + vdiffr::expect_doppelganger("tips-fill-red", ggally_cross(tips, mapping = aes(x = smoker, y = sex), fill = "red")) # Custom shape - expect_print(ggally_cross(tips, mapping = aes(x = smoker, y = sex), shape = 21)) + vdiffr::expect_doppelganger("tips-shape", ggally_cross(tips, mapping = aes(x = smoker, y = sex), shape = 21)) # Fill squares according to standardized residuals d <- as.data.frame(Titanic) - expect_print(ggally_cross( - d, - mapping = aes(x = Class, y = Survived, weight = Freq, fill = after_stat(std.resid)) - ) + - scale_fill_steps2(breaks = c(-3, -2, 2, 3), show.limits = TRUE)) + vdiffr::expect_doppelganger( + "titanic-fill-steps2", + ggally_cross( + d, + mapping = aes(x = Class, y = Survived, weight = Freq, fill = after_stat(std.resid)) + ) + + scale_fill_steps2(breaks = c(-3, -2, 2, 3), show.limits = TRUE) + ) # Add labels - expect_print(ggally_cross( - tips, - mapping = aes( - x = smoker, y = sex, colour = smoker, - label = scales::percent(after_stat(prop)) + vdiffr::expect_doppelganger( + "tips-label", + ggally_cross( + tips, + mapping = aes( + x = smoker, y = sex, colour = smoker, + label = scales::percent(after_stat(prop)) + ) ) - )) + ) # Customize labels' appearance and same size for all squares - expect_print(ggally_cross( - tips, - mapping = aes( - x = smoker, y = sex, - size = NULL, # do not map size to a variable - label = scales::percent(after_stat(prop)) - ), - size = 40, # fix value for points size - fill = "darkblue", - geom_text_args = list(colour = "white", fontface = "bold", size = 6) - )) + vdiffr::expect_doppelganger( + "tips-label-custom", + ggally_cross( + tips, + mapping = aes( + x = smoker, y = sex, + size = NULL, # do not map size to a variable + label = scales::percent(after_stat(prop)) + ), + size = 40, # fix value for points size + fill = "darkblue", + geom_text_args = list(colour = "white", fontface = "bold", size = 6) + ) + ) - expect_print(ggally_table(tips, mapping = aes(x = smoker, y = sex))) - expect_print(ggally_table(tips, mapping = aes(x = day, y = time))) - expect_print(ggally_table(tips, mapping = aes(x = smoker, y = sex, colour = smoker))) + vdiffr::expect_doppelganger("tips-sex", ggally_cross(tips, mapping = aes(x = smoker, y = sex))) + vdiffr::expect_doppelganger("tips-time", ggally_cross(tips, mapping = aes(x = day, y = time))) + vdiffr::expect_doppelganger("tips-time-color", ggally_table(tips, mapping = aes(x = smoker, y = sex, colour = smoker))) # colour is kept only if equal to x or y - expect_print(ggally_table(tips, mapping = aes(x = smoker, y = sex, colour = day))) + vdiffr::expect_doppelganger("tips-color-equal", ggally_table(tips, mapping = aes(x = smoker, y = sex, colour = day))) # diagonal version - expect_print(ggally_tableDiag(tips, mapping = aes(x = smoker))) + vdiffr::expect_doppelganger("tips-diagonal", ggally_tableDiag(tips, mapping = aes(x = smoker))) # custom label size and color - expect_print(ggally_table(tips, mapping = aes(x = smoker, y = sex), size = 16, color = "red")) + vdiffr::expect_doppelganger("tips-red-size16", ggally_table(tips, mapping = aes(x = smoker, y = sex), size = 16, color = "red")) # display column proportions - expect_print(ggally_table( + vdiffr::expect_doppelganger("table-label", ggally_table( tips, mapping = aes(x = day, y = sex, label = scales::percent(after_stat(col.prop))) )) # draw table cells - expect_print(ggally_table( + vdiffr::expect_doppelganger("table-color-fill", ggally_table( tips, mapping = aes(x = smoker, y = sex), geom_tile_args = list(colour = "black", fill = "white") )) # Use standardized residuals to fill table cells - expect_print(ggally_table( + vdiffr::expect_doppelganger("table-fill-steps2", ggally_table( as.data.frame(Titanic), mapping = aes( x = Class, y = Survived, weight = Freq, diff --git a/tests/testthat/test-stat_prop.R b/tests/testthat/test-stat_prop.R index 30fd23357..6441d6c84 100644 --- a/tests/testthat/test-stat_prop.R +++ b/tests/testthat/test-stat_prop.R @@ -1,19 +1,16 @@ context("stat_prop") test_that("example", { - expect_print <- function(x) { - expect_silent(print(x)) - } d <- as.data.frame(Titanic) p <- ggplot(d) + aes(x = Class, fill = Survived, weight = Freq, by = Class) + geom_bar(position = "fill") + geom_text(stat = "prop", position = position_fill(.5)) - expect_print(p) - expect_print(p + facet_grid(~Sex)) + vdiffr::expect_doppelganger("titanic", p) + vdiffr::expect_doppelganger("titanic-facet", p + facet_grid(~Sex)) - expect_print(ggplot(d) + + vdiffr::expect_doppelganger("titanic-dodge", ggplot(d) + aes(x = Class, fill = Survived, weight = Freq) + geom_bar(position = "dodge") + geom_text( @@ -22,7 +19,7 @@ test_that("example", { position = position_dodge(0.9), vjust = "bottom" )) - expect_print(ggplot(d) + + vdiffr::expect_doppelganger("titanic-stack", ggplot(d) + aes(x = Class, fill = Survived, weight = Freq, by = 1) + geom_bar() + geom_text( @@ -34,27 +31,26 @@ test_that("example", { skip_if_not_installed("reshape") data(tips, package = "reshape") - expect_print(ggally_colbar(tips, mapping = aes(x = smoker, y = sex))) - expect_print(ggally_rowbar(tips, mapping = aes(x = smoker, y = sex))) + vdiffr::expect_doppelganger("tips", ggally_rowbar(tips, mapping = aes(x = smoker, y = sex))) # change labels' size - expect_print(ggally_colbar(tips, mapping = aes(x = smoker, y = sex), size = 8)) + vdiffr::expect_doppelganger("tips-size8", ggally_colbar(tips, mapping = aes(x = smoker, y = sex), size = 8)) # change labels' colour and use bold - expect_print(ggally_colbar(tips, mapping = aes(x = smoker, y = sex), + vdiffr::expect_doppelganger("tips-color-white", ggally_colbar(tips, mapping = aes(x = smoker, y = sex), colour = "white", fontface = "bold")) # display number of observations instead of proportions - expect_print(ggally_colbar(tips, mapping = aes(x = smoker, y = sex, label = after_stat(count)))) + vdiffr::expect_doppelganger("tips-label", ggally_colbar(tips, mapping = aes(x = smoker, y = sex, label = after_stat(count)))) # custom bar width - expect_print(ggally_colbar(tips, mapping = aes(x = smoker, y = sex), geom_bar_args = list(width = .5))) + vdiffr::expect_doppelganger("tips-bar-width", ggally_colbar(tips, mapping = aes(x = smoker, y = sex), geom_bar_args = list(width = .5))) # change format of labels - expect_print(ggally_colbar(tips, mapping = aes(x = smoker, y = sex), + vdiffr::expect_doppelganger("tips-label-custom", ggally_colbar(tips, mapping = aes(x = smoker, y = sex), label_format = scales::label_percent(accuracy = .01, decimal.mark = ","))) - expect_print(ggduo( + vdiffr::expect_doppelganger("ggduo-titanic", ggduo( data = as.data.frame(Titanic), mapping = aes(weight = Freq), columnsX = "Survived", @@ -65,14 +61,10 @@ test_that("example", { }) test_that("stat_prop() works with an y aesthetic", { - expect_print <- function(x) { - expect_silent(print(x)) - } - d <- as.data.frame(Titanic) p <- ggplot(d) + aes(y = Class, fill = Survived, weight = Freq, by = Class) + geom_bar(position = "fill") + geom_text(stat = "prop", position = position_fill(.5)) - expect_print(p) + vdiffr::expect_doppelganger("titanic-stat-prop", p) }) diff --git a/tests/testthat/test-stat_weighted_mean.R b/tests/testthat/test-stat_weighted_mean.R index f1d517dcb..b7d772cd4 100644 --- a/tests/testthat/test-stat_weighted_mean.R +++ b/tests/testthat/test-stat_weighted_mean.R @@ -1,42 +1,52 @@ context("stat_weighted_mean") test_that("example", { - expect_print <- function(x) { - expect_silent(print(x)) - } - skip_if_not_installed("reshape") data(tips, package = "reshape") - expect_print(ggplot(tips) + + vdiffr::expect_doppelganger( + "point", + ggplot(tips) + aes(x = day, y = total_bill) + geom_point()) - expect_print(ggplot(tips) + + vdiffr::expect_doppelganger( + "geom-default", + ggplot(tips) + aes(x = day, y = total_bill) + stat_weighted_mean()) - expect_print(ggplot(tips) + + vdiffr::expect_doppelganger( + "geom-line", + ggplot(tips) + aes(x = day, y = total_bill, group = 1) + stat_weighted_mean(geom = "line")) - expect_print(ggplot(tips) + + vdiffr::expect_doppelganger( + "geom-line-grouped", + ggplot(tips) + aes(x = day, y = total_bill, colour = sex, group = sex) + stat_weighted_mean(geom = "line")) - expect_print(ggplot(tips) + + vdiffr::expect_doppelganger( + "geom-bar-dodge", + ggplot(tips) + aes(x = day, y = total_bill, fill = sex) + stat_weighted_mean(geom = "bar", position = "dodge")) # computing a proportion on the fly - expect_print(ggplot(tips) + + vdiffr::expect_doppelganger( + "geom-bar-dodge-percent", + ggplot(tips) + aes(x = day, y = as.integer(smoker == "Yes"), fill = sex) + stat_weighted_mean(geom = "bar", position = "dodge") + scale_y_continuous(labels = scales::percent)) # taking into account some weights d <- as.data.frame(Titanic) - expect_print(ggplot(d) + + vdiffr::expect_doppelganger( + "titanic", + ggplot(d) + aes(x = Class, y = as.integer(Survived == "Yes"), weight = Freq, fill = Sex) + geom_bar(stat = "weighted_mean", position = "dodge") + scale_y_continuous(labels = scales::percent) + @@ -47,30 +57,60 @@ test_that("example", { tips_f$day <- factor(tips$day, c("Thur", "Fri", "Sat", "Sun")) # Numeric variable - expect_print(ggally_trends(tips_f, mapping = aes(x = day, y = total_bill))) - expect_print(ggally_trends(tips_f, mapping = aes(x = day, y = total_bill, colour = time))) + vdiffr::expect_doppelganger( + "trends", + ggally_trends(tips_f, mapping = aes(x = day, y = total_bill)) + ) + vdiffr::expect_doppelganger( + "trends-color", + ggally_trends(tips_f, mapping = aes(x = day, y = total_bill, colour = time)) + ) # Binary variable - expect_print(ggally_trends(tips_f, mapping = aes(x = day, y = smoker))) - expect_print(ggally_trends(tips_f, mapping = aes(x = day, y = smoker, colour = sex))) + vdiffr::expect_doppelganger( + "trends-binary", + ggally_trends(tips_f, mapping = aes(x = day, y = smoker)) + ) + vdiffr::expect_doppelganger( + "trends-binary-color", + ggally_trends(tips_f, mapping = aes(x = day, y = smoker, colour = sex)) + ) # Discrete variable with 3 or more categories - expect_print(ggally_trends(tips_f, mapping = aes(x = smoker, y = day))) - expect_print(ggally_trends(tips_f, mapping = aes(x = smoker, y = day, color = sex))) + vdiffr::expect_doppelganger( + "trends-many", + ggally_trends(tips_f, mapping = aes(x = smoker, y = day)) + ) + vdiffr::expect_doppelganger( + "trends-many-color", + ggally_trends(tips_f, mapping = aes(x = smoker, y = day, color = sex)) + ) # Include zero on Y axis - expect_print(ggally_trends(tips_f, mapping = aes(x = day, y = total_bill), include_zero = TRUE)) - expect_print(ggally_trends(tips_f, mapping = aes(x = day, y = smoker), include_zero = TRUE)) + vdiffr::expect_doppelganger( + "trends-incl-zero-false", + ggally_trends(tips_f, mapping = aes(x = day, y = total_bill), include_zero = TRUE) + ) + vdiffr::expect_doppelganger( + "trends-incl-zero-true", + ggally_trends(tips_f, mapping = aes(x = day, y = smoker), include_zero = TRUE) + ) # Change line size - expect_print(ggally_trends(tips_f, mapping = aes(x = day, y = smoker, colour = sex), size = 3)) + vdiffr::expect_doppelganger( + "trends-size-3", + ggally_trends(tips_f, mapping = aes(x = day, y = smoker, colour = sex), size = 3) + ) # Define weights with the appropriate aesthetic d <- as.data.frame(Titanic) - expect_print(ggally_trends( - d, - mapping = aes(x = Class, y = Survived, weight = Freq, color = Sex), - include_zero = TRUE - )) + vdiffr::expect_doppelganger( + "trends-titanic", + ggally_trends( + d, + mapping = aes(x = Class, y = Survived, weight = Freq, color = Sex), + include_zero = TRUE + ) + ) }) diff --git a/tests/testthat/test-zzz_ggpairs.R b/tests/testthat/test-zzz_ggpairs.R index 9bad1d758..62486dcfe 100644 --- a/tests/testthat/test-zzz_ggpairs.R +++ b/tests/testthat/test-zzz_ggpairs.R @@ -4,10 +4,6 @@ testthat::skip_on_cran() data(tips, package = "reshape") -expect_print <- function(p) { - testthat::expect_silent(print(p)) -} - facethistBindwidth1 <- list(combo = wrap("facethist", binwidth = 1)) facethistBindwidth1Duo <- list( comboHorizontal = wrap("facethist", binwidth = 1), @@ -106,19 +102,19 @@ test_that("upper/lower/diag = blank", { for (i in 1:3) { for (j in 1:3) { if (i < j) { - expect_true( is_blank_plot(au[i, j])) - expect_false( is_blank_plot(ad[i, j])) - expect_false( is_blank_plot(al[i, j])) + expect_true(is_blank_plot(au[i, j])) + expect_false(is_blank_plot(ad[i, j])) + expect_false(is_blank_plot(al[i, j])) } if (i > j) { - expect_false( is_blank_plot(au[i, j])) - expect_false( is_blank_plot(ad[i, j])) - expect_true( is_blank_plot(al[i, j])) + expect_false(is_blank_plot(au[i, j])) + expect_false(is_blank_plot(ad[i, j])) + expect_true(is_blank_plot(al[i, j])) } if (i == j) { - expect_false( is_blank_plot(au[i, j])) - expect_true( is_blank_plot(ad[i, j])) - expect_false( is_blank_plot(al[i, j])) + expect_false(is_blank_plot(au[i, j])) + expect_true(is_blank_plot(ad[i, j])) + expect_false(is_blank_plot(al[i, j])) } } } @@ -164,13 +160,13 @@ test_that("stops", { ggpairs(tips, params = c(size = 2)) }, "'params' is a deprecated") # nolint - expect_error( { + expect_error({ ggpairs(tips, columns = 1:10) }, "Make sure your numeric 'columns' values are less than or equal to") # nolint - expect_error( { + expect_error({ ggduo(tips, columnsX = 1:10) }, "Make sure your numeric 'columnsX' values are less than or equal to") # nolint - expect_error( { + expect_error({ ggduo(tips, columnsY = 1:10) }, "Make sure your numeric 'columnsY' values are less than or equal to") # nolint @@ -295,7 +291,7 @@ test_that("blank types", { expect_false(is_blank_plot(pmDiag[i, j])) expect_false(is_blank_plot(pmLower[i, j])) - } else if ( i > j) { + } else if (i > j) { # lower expect_false(is_blank_plot(pmUpper[i, j])) expect_false(is_blank_plot(pmDiag[i, j])) @@ -322,7 +318,7 @@ test_that("blank types", { }) test_that("axisLabels", { - expect_obj <- function(pm, axisLabel) { + expect_axis_labels <- function(pm, prefix, axisLabel) { expect_true(is.null(pm$showStrips)) if (axisLabel == "show") { expect_true(pm$showXAxisPlotLabels) @@ -346,7 +342,7 @@ test_that("axisLabels", { expect_false(is.null(pm$xAxisLabels)) expect_false(is.null(pm$yAxisLabels)) } - expect_print(pm) + vdiffr::expect_doppelganger(paste0("axisLabels-", prefix, "-", axisLabel), pm) } fn <- function(axisLabels) { @@ -361,7 +357,7 @@ test_that("axisLabels", { pm } for (axisLabels in c("show", "internal", "none")) { - expect_obj(fn(axisLabels), axisLabels) + expect_axis_labels(fn(axisLabels), "ggpairs", axisLabels) } plots <- ggpairs(iris, 1:3)$plots @@ -385,7 +381,7 @@ test_that("axisLabels", { a } for (axisLabels in c("show", "none")) { - expect_obj(fn(axisLabels), axisLabels) + expect_axis_labels(fn(axisLabels), "ggduo", axisLabels) } }) @@ -400,7 +396,7 @@ test_that("strips and axis", { title = "Axis should line up even if strips are present", lower = list(combo = wrap("facethist", binwidth = 1)) ) - expect_print(pm) + vdiffr::expect_doppelganger("show-strips", pm) # default behavior. tested in other places # expect_silent({ # pm <- ggpairs(tips, c(3, 1, 4), showStrips = FALSE) @@ -512,7 +508,7 @@ test_that("NA data", { if (na_mat[i, j]) { expect_is_na_plot(pm[i, j]) } else { - if (j == 3 & i < 3) { + if (j == 3 && i < 3) { expect_warning({ p <- pm[i, j] }, @@ -558,7 +554,7 @@ test_that("strip-top and strip-right", { upper = list(discrete = double_strips), progress = FALSE ) - expect_print(pm) + vdiffr::expect_doppelganger("nested-strips-default", pm) pm <- ggpairs( tips, 3:6, lower = "blank", diag = "blank", @@ -566,7 +562,7 @@ test_that("strip-top and strip-right", { showStrips = TRUE, progress = FALSE ) - expect_print(pm) + vdiffr::expect_doppelganger("nested-strips-true", pm) }) @@ -661,23 +657,37 @@ test_that("subtypes", { wrap("facethist", binwidth = 1), "facetdensity", "facetdensitystrip", - "summarise_by", + # "summarise_by", # Issues with grid printing wrap("denstrip", binwidth = 1), "blank" ) disSubs <- list( "autopoint", "colbar", "count", "cross", "crosstable", "facetbar", - "ratio", "rowbar", "table", "trends", + "ratio", "rowbar", + "table", + # "trends", # Issues with grid printing "blank") conDiagSubs <- c("autopointDiag", "densityDiag", wrap("barDiag", binwidth = 1), "blankDiag") disDiagSubs <- c("autopointDiag", "barDiag", "countDiag", "tableDiag", "blankDiag") # for (fn in list(ggpairs_fn1, ggpairs_fn2, ggduo_fn1, ggduo_fn2)) { - for (fn_num in 1:4) { - fn <- list(ggpairs_fn1, ggpairs_fn2, ggduo_fn1, ggduo_fn2)[[fn_num]] - for (i in 1:6) { + for (fn_info in list( + list(fn = ggpairs_fn1, title = "ggpairs"), + list(fn = ggpairs_fn2, title = "ggpairs_color"), + list(fn = ggduo_fn1, title = "ggduo"), + list(fn = ggduo_fn2, title = "ggduo_color") + )) { + fn <- fn_info$fn + fn_name <- fn_info$title + for (i in 1:max(c( + length(conSubs), + length(comSubs), + length(disSubs), + length(conDiagSubs), + length(disDiagSubs) + ))) { conSub <- if (i <= length(conSubs)) conSubs[[i]] else "blank" comSub <- if (i <= length(comSubs)) comSubs[[i]] else "blank" disSub <- if (i <= length(disSubs)) disSubs[[i]] else "blank" @@ -712,10 +722,33 @@ test_that("subtypes", { ) }) - if (grepl("/Users/barret/", getwd(), fixed = TRUE)) { - # only if on personal machine, do viz test - expect_print(pm) + type_name <- function(x) { + if (is.function(x)) { + sub("ggally_", "", attr(x, "name")) + } else { + x + } } + type_names <- vapply(c(conSub, comSub, disSub, diagConSub, diagDisSub), type_name, character(1)) + if (all(grepl("blank", type_names))) { + # vdiffr can't handle blank plots + next + } + pm_name <- paste0(type_names, collapse = "-") + pm_name <- paste0(fn_name, "-", pm_name) + + tryCatch({ + set.seed(123456) # keep jitter consistent + suppressWarnings({ + built_pm <- ggmatrix_gtable(pm) + }) + vdiffr::expect_doppelganger(pm_name, built_pm) + }, error = function(e) { + print("failed to create doppelganger") + print(pm_name) + print(e) + barret <<- pm + }) } } @@ -739,7 +772,7 @@ test_that("subtypes", { # # pm # # Use sample of the diamonds data -# data(diamonds, package="ggplot2") +# data(diamonds, package = "ggplot2") # diamonds.samp <- diamonds[sample(1:dim(diamonds)[1], 200), ] # # Custom Example @@ -762,19 +795,19 @@ test_that("subtypes", { # # bad_plots # # Only Variable Labels on the diagonal (no axis labels) -# pm <- ggpairs(tips[, 1:3], axisLabels="internal") +# pm <- ggpairs(tips[, 1:3], axisLabels = "internal") # # pm # # Only Variable Labels on the outside (no axis labels) -# pm <- ggpairs(tips[, 1:3], axisLabels="none") +# pm <- ggpairs(tips[, 1:3], axisLabels = "none") # # pm # # Custom Examples # custom_car <- ggpairs(mtcars[, c("mpg", "wt", "cyl")], upper = "blank", title = "Custom Example") # #' # ggplot example taken from example(geom_text) -# #' plot <- ggplot2::ggplot(mtcars, ggplot2::aes(x=wt, y=mpg, label=rownames(mtcars))) +# #' plot <- ggplot2::ggplot(mtcars, ggplot2::aes(x = wt, y = mpg, label = rownames(mtcars))) # #' plot <- plot + -# #' ggplot2::geom_text(ggplot2::aes(colour=factor(cyl)), size = 3) + -# #' ggplot2::scale_colour_discrete(l=40) +# #' ggplot2::geom_text(ggplot2::aes(colour = factor(cyl)), size = 3) + +# #' ggplot2::scale_colour_discrete(l = 40) # #' custom_car <- putPlot(custom_car, plot, 1, 2) # #' personal_plot <- ggally_text( # #' "ggpairs allows you\nto put in your\nown plot.\nLike that one.\n <---" diff --git a/vignettes/ggally_stats.Rmd b/vignettes/ggally_stats.Rmd index 90aab9031..46835ae04 100644 --- a/vignettes/ggally_stats.Rmd +++ b/vignettes/ggally_stats.Rmd @@ -157,7 +157,7 @@ ggplot(d) + scale_y_continuous(labels = scales::percent) + geom_text( mapping = aes( - label = scales::percent(after_stat(prop), accuracy = .1), + label = scales::percent(after_stat(prop), accuracy = .1), y = after_stat(0.01) ), vjust = "bottom", @@ -244,4 +244,3 @@ ggplot(d) + scale_y_continuous(labels = scales::percent) + labs(y = "Proportion who survived") ``` - diff --git a/vignettes/ggbivariate.Rmd b/vignettes/ggbivariate.Rmd index 2532f7cea..e09a7bbb0 100644 --- a/vignettes/ggbivariate.Rmd +++ b/vignettes/ggbivariate.Rmd @@ -100,8 +100,8 @@ ggbivariate(d, "Survived", mapping = aes(weight = Freq)) ```{r} ggbivariate( - tips, - outcome = "smoker", + tips, + outcome = "smoker", explanatory = c("day", "time", "sex", "tip"), types = list(comboVertical = "autopoint") ) diff --git a/vignettes/ggduo.Rmd b/vignettes/ggduo.Rmd index 94b5e4a7b..98579b4e6 100644 --- a/vignettes/ggduo.Rmd +++ b/vignettes/ggduo.Rmd @@ -92,7 +92,7 @@ ggduo( title = "Between Academic and Psychological Variable Correlation", xlab = "Psychological", ylab = "Academic", - legend = c(5,2) + legend = c(5, 2) ) + theme(legend.position = "bottom") ``` @@ -138,7 +138,7 @@ pigs_types <- list( ggts(pigs_dt, "time", 2:7, types = pigs_types) # add color and legend pigs_mapping <- aes(color = profit_group) -ggts(pigs_dt, pigs_mapping, "time", 2:7, types = pigs_types, legend = c(6,1)) +ggts(pigs_dt, pigs_mapping, "time", 2:7, types = pigs_types, legend = c(6, 1)) ``` Produce more meaningful labels, add a legend, and remove profit group strips. @@ -148,7 +148,7 @@ pm <- ggts( pigs_dt, pigs_mapping, 1, 2:7, types = pigs_types, - legend = c(6,1), + legend = c(6, 1), columnLabelsY = c( "number of\nfirst birth sows", "sell price over\nfeed cost", @@ -191,14 +191,17 @@ y_range <- range(unlist(residuals)) # custom function to display continuous data. If the y variable is "Residual", do custom work. lm_or_resid <- function(data, mapping, ..., line_color = "red", line_size = 1) { - if (as.character(mapping$y) != "Residual") { + if (!identical( + rlang::expr_text(mapping$y), + rlang::expr_text(ggplot2::aes(y = Residual)$y) + )) { return(ggally_smooth_lm(data, mapping, ...)) } # make residual data to display resid_data <- data.frame( - x = data[[as.character(mapping$x)]], - y = residuals[[as.character(mapping$x)]] + x = rlang::eval_tidy(mapping$x, data = data), + y = rlang::eval_tidy(mapping$x, data = residuals) ) ggplot(data = data, mapping = mapping) + @@ -211,14 +214,14 @@ lm_or_resid <- function(data, mapping, ..., line_color = "red", line_size = 1) { # plot the data ggduo( swiss, - 2:6, c(1,7), + 2:6, c(1, 7), types = list(continuous = lm_or_resid) ) # change line to be thicker and blue and the points to be slightly transparent ggduo( swiss, - 2:6, c(1,7), + 2:6, c(1, 7), types = list( continuous = wrap(lm_or_resid, alpha = 0.7, @@ -240,4 +243,3 @@ You can customize the type of plots to display with the `types` argument. `types * `na`: when all x data and all y data is `NA` The list of current valid `ggally_NAME` functions is visible in `vig_ggally("ggally_plots")`. - diff --git a/vignettes/ggmatrix.Rmd b/vignettes/ggmatrix.Rmd index 35bbf99fd..061ce64f7 100644 --- a/vignettes/ggmatrix.Rmd +++ b/vignettes/ggmatrix.Rmd @@ -74,12 +74,12 @@ pm <- ggmatrix( title = "Matrix Title" ) pm -p2 <- pm[1,2] -p3 <- pm[1,3] +p2 <- pm[1, 2] +p3 <- pm[1, 3] p2 p3 -pm[1,2] <- p3 -pm[1,3] <- p2 +pm[1, 2] <- p3 +pm[1, 3] <- p2 pm ``` @@ -176,5 +176,3 @@ pm <- ggmatrix( ) pm ``` - - diff --git a/vignettes/ggnetworkmap.Rmd b/vignettes/ggnetworkmap.Rmd index e40cb6dcf..dd7e9673a 100644 --- a/vignettes/ggnetworkmap.Rmd +++ b/vignettes/ggnetworkmap.Rmd @@ -50,8 +50,8 @@ flights <- data.frame( flights <- network(flights, directed = TRUE) # add geographic coordinates -flights %v% "lat" <- airports[ network.vertex.names(flights), "lat" ] -flights %v% "lon" <- airports[ network.vertex.names(flights), "long" ] +flights %v% "lat" <- airports[network.vertex.names(flights), "lat"] +flights %v% "lon" <- airports[network.vertex.names(flights), "long"] # drop isolated airports delete.vertices(flights, which(degree(flights) < 2)) diff --git a/vignettes/ggpairs.Rmd b/vignettes/ggpairs.Rmd index e3f01bc52..1e783a562 100644 --- a/vignettes/ggpairs.Rmd +++ b/vignettes/ggpairs.Rmd @@ -104,7 +104,7 @@ The `ggally_NAME` functions do not provide all graphical options. Instead of su The custom function should follow the api of ```{r ggally_custom_function} -custom_function <- function(data, mapping, ...){ +custom_function <- function(data, mapping, ...) { # produce ggplot2 object here } ``` @@ -155,10 +155,10 @@ Small `ggpairs()` example: ```{r ggpairs_matrix} pm <- ggpairs(tips, columns = c("total_bill", "time", "tip")) # retrieve the third row, first column plot -p <- pm[3,1] +p <- pm[3, 1] p <- p + aes(color = time) p -pm[3,1] <- p +pm[3, 1] <- p pm ``` diff --git a/vignettes/ggscatmat.Rmd b/vignettes/ggscatmat.Rmd index 8951eef8b..5657ba6e1 100644 --- a/vignettes/ggscatmat.Rmd +++ b/vignettes/ggscatmat.Rmd @@ -29,7 +29,7 @@ The primary function is `ggscatmat()`. It is similar to `ggpairs()` but only wor ```{r ggscatmat-basic-usage, fig.height=7, fig.width=7} data(flea) -ggscatmat(flea, columns = 2:4, color="species", alpha=0.8) +ggscatmat(flea, columns = 2:4, color = "species", alpha = 0.8) ``` In this plot, you can see that the three different species vary a little from each other in these three variables. Heptapot (blue) has smaller values on the variable `tars1` than the other two. The correlation between the three variables is similar for all species. diff --git a/vignettes/ggsurv.Rmd b/vignettes/ggsurv.Rmd index 42e24b755..8946b66e8 100644 --- a/vignettes/ggsurv.Rmd +++ b/vignettes/ggsurv.Rmd @@ -59,9 +59,9 @@ Since a ggplot2 object is returned, plot objects may be altered after the origin pl.sex + ggplot2::guides(linetype = "none") + ggplot2::scale_colour_discrete( - name = 'Sex', + name = "Sex", breaks = c(1, 2), - labels = c('Male', 'Female') + labels = c("Male", "Female") ) ``` diff --git a/vignettes/glyph.Rmd b/vignettes/glyph.Rmd index 5317f8906..9dab7dbb0 100644 --- a/vignettes/glyph.Rmd +++ b/vignettes/glyph.Rmd @@ -28,7 +28,7 @@ This function rearranges data to be able to construct a glyph plot ```{r glyphs-basic-usage, fig.height=7, fig.width=7} library(ggplot2) data(nasa) -temp.gly <- glyphs(nasa, "long", "day", "lat", "surftemp", height=2.5) +temp.gly <- glyphs(nasa, "long", "day", "lat", "surftemp", height = 2.5) ggplot(temp.gly, ggplot2::aes(gx, gy, group = gid)) + add_ref_lines(temp.gly, color = "grey90") + add_ref_boxes(temp.gly, color = "grey90") +