Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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"),
Expand Down
5 changes: 2 additions & 3 deletions R/plot_metagam.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,22 +92,21 @@ 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")

ggplot2::ggplot(metadat, ggplot2::aes(x = .data$xxxaaa, y = .data$xxxbbb,
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]]) +
Expand Down
4 changes: 2 additions & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 1 addition & 0 deletions news.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down