-
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
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
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")) | ||
) | ||
}) |