-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from 0UmfHxcvx5J7JoaOhFSs5mncnisTJJ6q/dev/plo…
…tstyle_keep_units plotstyle() does not strip units from variable names, based on strip_units argument or plotstyle.strip_units option
- Loading branch information
Showing
9 changed files
with
49 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.148.21 | ||
Date: 2024-07-02 | ||
Version: 0.149.0 | ||
Date: 2024-07-09 | ||
Authors@R: c( | ||
person("David", "Klein", , "[email protected]", role = c("aut", "cre")), | ||
person("Jan Philipp", "Dietrich", , "[email protected]", role = "aut"), | ||
|
@@ -25,20 +25,21 @@ Depends: | |
magclass, | ||
quitte (>= 0.3072) | ||
Imports: | ||
RColorBrewer, | ||
data.table, | ||
dplyr, | ||
ggplot2, | ||
gridExtra, | ||
htmltools, | ||
lusweave (>= 1.43.2), | ||
plotly, | ||
RColorBrewer, | ||
reshape2, | ||
rlang, | ||
shiny, | ||
stringr, | ||
tidyr, | ||
trafficlight, | ||
stringr | ||
withr, | ||
Suggests: | ||
gdxrrw, | ||
knitr, | ||
|
@@ -48,4 +49,4 @@ VignetteBuilder: | |
knitr | ||
Encoding: UTF-8 | ||
LazyData: yes | ||
RoxygenNote: 7.3.1 | ||
RoxygenNote: 7.3.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
#' The MIP R package | ||
#' | ||
#' | ||
#' Contains the routines for plotting multi model and multi scenario comparisons | ||
#' | ||
#' | ||
#' \tabular{ll}{ Package: \tab mip\cr Type: \tab Package\cr Version: \tab | ||
#' 7.6\cr Date: \tab 2016-06-13\cr License: \tab LGPL-3\cr LazyLoad: \tab | ||
#' yes\cr } | ||
#' | ||
#' | ||
#' @name mip-package | ||
#' @aliases mip-package mip | ||
#' @author David Klein | ||
#' | ||
#' | ||
#' Maintainer: Anastasis Giannousakis <giannou@@pik-potsdam.de> | ||
"_PACKAGE" | ||
|
||
ignore_unused_imports <- function() { | ||
withr::with_options # used in tests | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Comparison of multi-model runs | ||
|
||
R package **mip**, version **0.148.21** | ||
R package **mip**, version **0.149.0** | ||
|
||
[![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) | ||
|
||
|
@@ -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, Rüter T (2024). _mip: Comparison of multi-model runs_. doi:10.5281/zenodo.1158586 <https://doi.org/10.5281/zenodo.1158586>, R package version 0.148.21, <https://github.com/pik-piam/mip>. | ||
Klein D, Dietrich J, Baumstark L, Humpenoeder F, Stevanovic M, Wirth S, Führlich P, Richters O, Rüter T (2024). _mip: Comparison of multi-model runs_. doi:10.5281/zenodo.1158586 <https://doi.org/10.5281/zenodo.1158586>, R package version 0.149.0, <https://github.com/pik-piam/mip>. | ||
|
||
A BibTeX entry for LaTeX users is | ||
|
||
|
@@ -56,7 +56,7 @@ 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 and Tonn Rüter}, | ||
year = {2024}, | ||
note = {R package version 0.148.21}, | ||
note = {R package version 0.149.0}, | ||
url = {https://github.com/pik-piam/mip}, | ||
doi = {10.5281/zenodo.1158586}, | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
test_that( | ||
"plotstyle() does not strip units if told not to do so", | ||
{ | ||
expect_identical(plotstyle("Forcing|CO2 (W/m2)"), | ||
c(`Forcing|CO2` = "#e6194B")) | ||
|
||
expect_identical(plotstyle("Forcing|CO2 (W/m2)", strip_units = FALSE), | ||
c(`Forcing|CO2 (W/m2)` = "#e6194B")) | ||
|
||
withr::with_options( | ||
list('plotstyle.strip_units' = FALSE), | ||
expect_identical(plotstyle("Forcing|CO2 (W/m2)"), | ||
c(`Forcing|CO2 (W/m2)` = "#e6194B")) | ||
) | ||
}) |