From cfdbea36d6fb74d9eca406211465bdfdc0e2aaf8 Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Sat, 14 Jan 2023 08:06:15 +0100 Subject: [PATCH 1/3] Try ragg png device --- CITATION.cff | 27 --------------------------- DESCRIPTION | 1 - codemeta.json | 14 +------------- vignettes/setup.R | 3 ++- vignettes/web_only/faq.Rmd | 4 +--- vignettes/web_only/ggbetweenstats.Rmd | 4 +--- vignettes/web_only/ggcoefstats.Rmd | 4 +--- vignettes/web_only/ggcorrmat.Rmd | 4 +--- vignettes/web_only/gghistostats.Rmd | 4 +--- vignettes/web_only/ggscatterstats.Rmd | 4 +--- vignettes/web_only/ggwithinstats.Rmd | 2 -- vignettes/web_only/pairwise.Rmd | 4 +--- vignettes/web_only/principles.Rmd | 4 +--- 13 files changed, 11 insertions(+), 68 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 2dcf7ba63..abec3335c 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -668,33 +668,6 @@ references: given-names: Terry M email: therneau.terry@mayo.edu year: '2023' -- type: software - title: svglite - abstract: 'svglite: An ''SVG'' Graphics Device' - notes: Suggests - url: https://svglite.r-lib.org - repository: https://CRAN.R-project.org/package=svglite - authors: - - family-names: Wickham - given-names: Hadley - email: hadley@posit.co - - family-names: Henry - given-names: Lionel - email: lionel@posit.co - - family-names: Pedersen - given-names: Thomas Lin - email: thomas.pedersen@posit.co - orcid: https://orcid.org/0000-0002-5147-4711 - - family-names: Luciani - given-names: T Jake - email: jake@apache.org - - family-names: Decorde - given-names: Matthieu - email: matthieu.decorde@ens-lyon.fr - - family-names: Lise - given-names: Vaudor - email: lise.vaudor@ens-lyon.fr - year: '2023' - type: software title: testthat abstract: 'testthat: Unit Testing for R' diff --git a/DESCRIPTION b/DESCRIPTION index 0dc637460..7a528d962 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -65,7 +65,6 @@ Suggests: psych, rmarkdown, survival, - svglite, testthat (>= 3.1.6), tibble, vdiffr, diff --git a/codemeta.json b/codemeta.json index 5c7fdfccb..706e872fe 100644 --- a/codemeta.json +++ b/codemeta.json @@ -241,18 +241,6 @@ }, "sameAs": "https://CRAN.R-project.org/package=survival" }, - { - "@type": "SoftwareApplication", - "identifier": "svglite", - "name": "svglite", - "provider": { - "@id": "https://cran.r-project.org", - "@type": "Organization", - "name": "Comprehensive R Archive Network (CRAN)", - "url": "https://cran.r-project.org" - }, - "sameAs": "https://CRAN.R-project.org/package=svglite" - }, { "@type": "SoftwareApplication", "identifier": "testthat", @@ -522,7 +510,7 @@ }, "SystemRequirements": null }, - "fileSize": "9519.653KB", + "fileSize": "9518.909KB", "citation": [ { "@type": "ScholarlyArticle", diff --git a/vignettes/setup.R b/vignettes/setup.R index 12dd1f316..ad098a0a4 100644 --- a/vignettes/setup.R +++ b/vignettes/setup.R @@ -4,7 +4,8 @@ knitr::opts_chunk$set( warning = FALSE, message = FALSE, out.width = "100%", - dpi = 300 + dpi = 300, + dev = "ragg_png" ) # to pretty-print all columns in the output tibble diff --git a/vignettes/web_only/faq.Rmd b/vignettes/web_only/faq.Rmd index 079a2e4d6..04c6938c2 100644 --- a/vignettes/web_only/faq.Rmd +++ b/vignettes/web_only/faq.Rmd @@ -23,8 +23,7 @@ source("../setup.R") #| include = FALSE pkgs <- c( - "PMCMRplus", - "svglite" + "PMCMRplus" ) successfully_loaded <- purrr::map_lgl(pkgs, requireNamespace, quietly = TRUE) @@ -32,7 +31,6 @@ can_evaluate <- all(successfully_loaded) if (can_evaluate) { purrr::walk(pkgs, library, character.only = TRUE) - # knitr::opts_chunk$set(eval = TRUE) } else { knitr::opts_chunk$set(eval = FALSE) } diff --git a/vignettes/web_only/ggbetweenstats.Rmd b/vignettes/web_only/ggbetweenstats.Rmd index 3bc67b9da..c8355e8a6 100644 --- a/vignettes/web_only/ggbetweenstats.Rmd +++ b/vignettes/web_only/ggbetweenstats.Rmd @@ -23,8 +23,7 @@ source("../setup.R") pkgs <- c( "gapminder", - "PMCMRplus", - "svglite" + "PMCMRplus" ) successfully_loaded <- purrr::map_lgl(pkgs, requireNamespace, quietly = TRUE) @@ -32,7 +31,6 @@ can_evaluate <- all(successfully_loaded) if (can_evaluate) { purrr::walk(pkgs, library, character.only = TRUE) - # knitr::opts_chunk$set(eval = TRUE) } else { knitr::opts_chunk$set(eval = FALSE) } diff --git a/vignettes/web_only/ggcoefstats.Rmd b/vignettes/web_only/ggcoefstats.Rmd index c78f8f0cd..118f84707 100644 --- a/vignettes/web_only/ggcoefstats.Rmd +++ b/vignettes/web_only/ggcoefstats.Rmd @@ -26,8 +26,7 @@ pkgs <- c( "BayesFactor", "lme4", "metaplus", - "survival", - "svglite" + "survival" ) successfully_loaded <- purrr::map_lgl(pkgs, requireNamespace, quietly = TRUE) @@ -35,7 +34,6 @@ can_evaluate <- all(successfully_loaded) if (can_evaluate) { purrr::walk(pkgs, library, character.only = TRUE) - knitr::opts_chunk$set(eval = TRUE) } else { knitr::opts_chunk$set(eval = FALSE) } diff --git a/vignettes/web_only/ggcorrmat.Rmd b/vignettes/web_only/ggcorrmat.Rmd index d198b36fc..625cb2eb2 100644 --- a/vignettes/web_only/ggcorrmat.Rmd +++ b/vignettes/web_only/ggcorrmat.Rmd @@ -23,8 +23,7 @@ source("../setup.R") #| include = FALSE pkgs <- c( - "gapminder", - "svglite" + "gapminder" ) successfully_loaded <- purrr::map_lgl(pkgs, requireNamespace, quietly = TRUE) @@ -32,7 +31,6 @@ can_evaluate <- all(successfully_loaded) if (can_evaluate) { purrr::walk(pkgs, library, character.only = TRUE) - knitr::opts_chunk$set(eval = TRUE) } else { knitr::opts_chunk$set(eval = FALSE) } diff --git a/vignettes/web_only/gghistostats.Rmd b/vignettes/web_only/gghistostats.Rmd index c4296e1ab..56d7e7093 100644 --- a/vignettes/web_only/gghistostats.Rmd +++ b/vignettes/web_only/gghistostats.Rmd @@ -29,8 +29,7 @@ source("../setup.R") #| include = FALSE pkgs <- c( - "psych", - "svglite" + "psych" ) successfully_loaded <- purrr::map_lgl(pkgs, requireNamespace, quietly = TRUE) @@ -38,7 +37,6 @@ can_evaluate <- all(successfully_loaded) if (can_evaluate) { purrr::walk(pkgs, library, character.only = TRUE) - knitr::opts_chunk$set(eval = TRUE) } else { knitr::opts_chunk$set(eval = FALSE) } diff --git a/vignettes/web_only/ggscatterstats.Rmd b/vignettes/web_only/ggscatterstats.Rmd index 725230861..a48b52c61 100644 --- a/vignettes/web_only/ggscatterstats.Rmd +++ b/vignettes/web_only/ggscatterstats.Rmd @@ -21,8 +21,7 @@ source("../setup.R") #| label = "suggested_pkgs", #| include = FALSE pkgs <- c( - "ggside", - "svglite" + "ggside" ) successfully_loaded <- purrr::map_lgl(pkgs, requireNamespace, quietly = TRUE) @@ -30,7 +29,6 @@ can_evaluate <- all(successfully_loaded) if (can_evaluate) { purrr::walk(pkgs, library, character.only = TRUE) - knitr::opts_chunk$set(eval = TRUE) } else { knitr::opts_chunk$set(eval = FALSE) } diff --git a/vignettes/web_only/ggwithinstats.Rmd b/vignettes/web_only/ggwithinstats.Rmd index 22044e67b..070a43168 100644 --- a/vignettes/web_only/ggwithinstats.Rmd +++ b/vignettes/web_only/ggwithinstats.Rmd @@ -25,7 +25,6 @@ source("../setup.R") pkgs <- c( "afex", "PMCMRplus", - "svglite", "WRS2" ) @@ -34,7 +33,6 @@ can_evaluate <- all(successfully_loaded) if (can_evaluate) { purrr::walk(pkgs, library, character.only = TRUE) - knitr::opts_chunk$set(eval = TRUE) } else { knitr::opts_chunk$set(eval = FALSE) } diff --git a/vignettes/web_only/pairwise.Rmd b/vignettes/web_only/pairwise.Rmd index 4b67fc00b..241063787 100644 --- a/vignettes/web_only/pairwise.Rmd +++ b/vignettes/web_only/pairwise.Rmd @@ -23,8 +23,7 @@ source("../setup.R") #| include = FALSE pkgs <- c( - "PMCMRplus", - "svglite" + "PMCMRplus" ) successfully_loaded <- purrr::map_lgl(pkgs, requireNamespace, quietly = TRUE) @@ -32,7 +31,6 @@ can_evaluate <- all(successfully_loaded) if (can_evaluate) { purrr::walk(pkgs, library, character.only = TRUE) - knitr::opts_chunk$set(eval = TRUE) } else { knitr::opts_chunk$set(eval = FALSE) } diff --git a/vignettes/web_only/principles.Rmd b/vignettes/web_only/principles.Rmd index a6ed2a688..b6000e1a2 100644 --- a/vignettes/web_only/principles.Rmd +++ b/vignettes/web_only/principles.Rmd @@ -25,8 +25,7 @@ source("../setup.R") #| include = FALSE pkgs <- c( - "PMCMRplus", - "svglite" + "PMCMRplus" ) successfully_loaded <- purrr::map_lgl(pkgs, requireNamespace, quietly = TRUE) @@ -34,7 +33,6 @@ can_evaluate <- all(successfully_loaded) if (can_evaluate) { purrr::walk(pkgs, library, character.only = TRUE) - knitr::opts_chunk$set(eval = TRUE) } else { knitr::opts_chunk$set(eval = FALSE) } From 67a47764c4224bfcff9f84e7ff2ef893d70c84a2 Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Sat, 14 Jan 2023 08:15:39 +0100 Subject: [PATCH 2/3] check that ragg is available --- CITATION.cff | 14 ++++++++++++++ DESCRIPTION | 1 + codemeta.json | 14 +++++++++++++- vignettes/setup.R | 21 +++++++++++---------- 4 files changed, 39 insertions(+), 11 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index abec3335c..3c4f514dd 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -617,6 +617,20 @@ references: email: revelle@northwestern.edu orcid: https://orcid.org/0000-0003-4880-9610 year: '2023' +- type: software + title: ragg + abstract: 'ragg: Graphic Devices Based on AGG' + notes: Suggests + url: https://ragg.r-lib.org + repository: https://CRAN.R-project.org/package=ragg + authors: + - family-names: Pedersen + given-names: Thomas Lin + email: thomas.pedersen@posit.co + orcid: https://orcid.org/0000-0002-5147-4711 + - family-names: Shemanarev + given-names: Maxim + year: '2023' - type: software title: rmarkdown abstract: 'rmarkdown: Dynamic Documents for R' diff --git a/DESCRIPTION b/DESCRIPTION index 7a528d962..ce2d6d418 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -63,6 +63,7 @@ Suggests: metaplus, PMCMRplus, psych, + ragg, rmarkdown, survival, testthat (>= 3.1.6), diff --git a/codemeta.json b/codemeta.json index 706e872fe..d3ffbb11b 100644 --- a/codemeta.json +++ b/codemeta.json @@ -217,6 +217,18 @@ }, "sameAs": "https://CRAN.R-project.org/package=psych" }, + { + "@type": "SoftwareApplication", + "identifier": "ragg", + "name": "ragg", + "provider": { + "@id": "https://cran.r-project.org", + "@type": "Organization", + "name": "Comprehensive R Archive Network (CRAN)", + "url": "https://cran.r-project.org" + }, + "sameAs": "https://CRAN.R-project.org/package=ragg" + }, { "@type": "SoftwareApplication", "identifier": "rmarkdown", @@ -510,7 +522,7 @@ }, "SystemRequirements": null }, - "fileSize": "9518.909KB", + "fileSize": "9518.993KB", "citation": [ { "@type": "ScholarlyArticle", diff --git a/vignettes/setup.R b/vignettes/setup.R index ad098a0a4..c08656b47 100644 --- a/vignettes/setup.R +++ b/vignettes/setup.R @@ -1,13 +1,3 @@ -knitr::opts_chunk$set( - collapse = TRUE, - comment = "#>", - warning = FALSE, - message = FALSE, - out.width = "100%", - dpi = 300, - dev = "ragg_png" -) - # to pretty-print all columns in the output tibble options( tibble.width = Inf, @@ -17,6 +7,17 @@ options( pillar.min_chars = Inf ) +device <- ifelse(requireNamespace("ragg", quietly = TRUE), "ragg_png", "png") +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>", + warning = FALSE, + message = FALSE, + out.width = "100%", + dpi = 300, + dev = device +) + # local library library(ggstatsplot) From 4a1d9b578bf49214bf8acd79faa3a40032c6792f Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Sat, 14 Jan 2023 08:29:24 +0100 Subject: [PATCH 3/3] Update setup.R --- vignettes/setup.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vignettes/setup.R b/vignettes/setup.R index c08656b47..06136a4a3 100644 --- a/vignettes/setup.R +++ b/vignettes/setup.R @@ -7,7 +7,7 @@ options( pillar.min_chars = Inf ) -device <- ifelse(requireNamespace("ragg", quietly = TRUE), "ragg_png", "png") +device <- ifelse(requireNamespace("ragg", quietly = TRUE), "ragg_png", "svg") knitr::opts_chunk$set( collapse = TRUE, comment = "#>",