From 02d3de8f5f27ed5c5a00fa6cf1e3edf83f84e0b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98ystein=20S=C3=B8rensen?= Date: Mon, 30 Jun 2025 16:24:14 +0200 Subject: [PATCH 1/2] should solve #65 --- R/plot_metagam.R | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/R/plot_metagam.R b/R/plot_metagam.R index 1c237bd..0f313ee 100755 --- a/R/plot_metagam.R +++ b/R/plot_metagam.R @@ -92,14 +92,14 @@ plot.metagam <- function(x, term = NULL, ci = "none", legend = FALSE, } else if(length(xvars) == 2){ metadat <- metadat[, c(xvars, "estimate", "se")] - plot_bivariate_smooth(metadat, xvars, term) + plot_bivariate_smooth(metadat, xvars) } else { stop("plot.metagam currently only works for univariate or bivariate terms.") } } -plot_bivariate_smooth <- function(metadat, xvars, term){ +plot_bivariate_smooth <- function(metadat, xvars){ names(metadat)[names(metadat) %in% xvars] <- c("xxxaaa", "xxxbbb") @@ -107,7 +107,6 @@ plot_bivariate_smooth <- function(metadat, xvars, term){ z = .data$estimate)) + ggplot2::geom_raster(ggplot2::aes(fill = .data$estimate)) + ggplot2::geom_contour() + - ggplot2::labs(term) + ggplot2::theme_minimal() + ggplot2::scale_fill_distiller(palette = "RdBu", type = "div") + ggplot2::xlab(xvars[[1]]) + From 3380e95c5bd1ad1aebf2c8ff6d0e1a996921743f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98ystein=20S=C3=B8rensen?= Date: Mon, 30 Jun 2025 16:27:22 +0200 Subject: [PATCH 2/2] administrative updates --- DESCRIPTION | 2 +- cran-comments.md | 4 ++-- news.md | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 866da1a..2479106 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: metagam Type: Package Title: Meta-Analysis of Generalized Additive Models -Version: 0.4.0.9000 +Version: 0.4.1 Authors@R: c(person("Oystein", "Sorensen", email = "oystein.sorensen@psykologi.uio.no", role = c("aut", "cre"), diff --git a/cran-comments.md b/cran-comments.md index 87c7d8e..c23e44a 100755 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,9 +1,9 @@ ## Comments -This is a resubmission which contains several improvements and bug fixes. We changed from using citEntry() to bibentry() after previous submission. +This is a resubmission which ensures consistency with the upcoming release of ggplot2. ## Test environments -* local OS X install, R 4.2.2 +* local OS X install, R 4.5.1 * os X, Windows, and Linux on GitHub Actions. * R win-devel diff --git a/news.md b/news.md index 8da3b53..8e7b30d 100755 --- a/news.md +++ b/news.md @@ -1,5 +1,6 @@ # metagam (development versions) +- Small internal fix for consistency with newest ggplot2 version. - Added a workaround which allows not providing the unused variables when the terms argument is used.