Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug: in showMultiLinePlotsByVariable.R x variables not in historical data file #85

Merged
merged 1 commit into from
Feb 6, 2024
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 .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '29034598'
ValidationKey: '29083776'
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
- 'Warning: namespace ''.*'' is not available and has been replaced'
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ cff-version: 1.2.0
message: If you use this software, please cite it using the metadata from this file.
type: software
title: 'mip: Comparison of multi-model runs'
version: 0.147.1
date-released: '2024-01-16'
version: 0.147.2
date-released: '2024-02-05'
abstract: Package contains generic functions to produce comparison plots of multi-model
runs.
authors:
Expand Down
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: mip
Title: Comparison of multi-model runs
Version: 0.147.1
Date: 2024-01-16
Version: 0.147.2
Date: 2024-02-05
Authors@R: c(
person("David", "Klein", , "[email protected]", role = c("aut", "cre")),
person("Jan Philipp", "Dietrich", , "[email protected]", role = "aut"),
Expand Down Expand Up @@ -47,4 +47,4 @@ VignetteBuilder:
knitr
Encoding: UTF-8
LazyData: yes
RoxygenNote: 7.3.0
RoxygenNote: 7.3.1
2 changes: 1 addition & 1 deletion R/showMultiLinePlotsByVariable.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ showMultiLinePlotsByVariable <- function(
checkGlobalOptionsProvided(c("mainReg", "histRefModel"))
stopifnot(is.character(mainReg) && length(mainReg) == 1)
stopifnot(is.character(histRefModel) && !is.null(names(histRefModel)))
stopifnot(xVar %in% names(histRefModel))

dy <- data %>%
filter(.data$variable %in% .env$vars)
Expand Down Expand Up @@ -110,6 +109,7 @@ showMultiLinePlotsByVariable <- function(
expand_limits(y = 0) +
ylab(label) + xlab(xLabel)
if (showHistorical) {
stopifnot(xVar %in% names(histRefModel))
p1 <- p1 +
geom_point(data = dMainHist, aes(shape = .data$model)) +
geom_line(data = dMainHist, aes(group = paste0(.data$model, .data$region)), alpha = 0.5)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Comparison of multi-model runs

R package **mip**, version **0.147.1**
R package **mip**, version **0.147.2**

[![CRAN status](https://www.r-pkg.org/badges/version/mip)](https://cran.r-project.org/package=mip) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1158586.svg)](https://doi.org/10.5281/zenodo.1158586) [![R build status](https://github.com/pik-piam/mip/workflows/check/badge.svg)](https://github.com/pik-piam/mip/actions) [![codecov](https://codecov.io/gh/pik-piam/mip/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/mip) [![r-universe](https://pik-piam.r-universe.dev/badges/mip)](https://pik-piam.r-universe.dev/builds)

Expand Down Expand Up @@ -47,7 +47,7 @@ In case of questions / problems please contact David Klein <[email protected]

To cite package **mip** in publications use:

Klein D, Dietrich J, Baumstark L, Humpenoeder F, Stevanovic M, Wirth S, Führlich P, Richters O (2024). _mip: Comparison of multi-model runs_. doi:10.5281/zenodo.1158586 <https://doi.org/10.5281/zenodo.1158586>, R package version 0.147.1, <https://github.com/pik-piam/mip>.
Klein D, Dietrich J, Baumstark L, Humpenoeder F, Stevanovic M, Wirth S, Führlich P, Richters O (2024). _mip: Comparison of multi-model runs_. doi:10.5281/zenodo.1158586 <https://doi.org/10.5281/zenodo.1158586>, R package version 0.147.2, <https://github.com/pik-piam/mip>.

A BibTeX entry for LaTeX users is

Expand All @@ -56,8 +56,8 @@ A BibTeX entry for LaTeX users is
title = {mip: Comparison of multi-model runs},
author = {David Klein and Jan Philipp Dietrich and Lavinia Baumstark and Florian Humpenoeder and Miodrag Stevanovic and Stephen Wirth and Pascal Führlich and Oliver Richters},
year = {2024},
note = {R package version 0.147.1},
url = {https://github.com/pik-piam/mip},
note = {R package version 0.147.2},
doi = {10.5281/zenodo.1158586},
url = {https://github.com/pik-piam/mip},
}
```
Loading