From b3501186f08041c26067d5992c7c7404bc1f5dee Mon Sep 17 00:00:00 2001 From: florianh Date: Tue, 30 Nov 2021 19:00:15 +0100 Subject: [PATCH] bugfix compareData --- .buildlibrary | 2 +- .github/workflows/lucode2-check.yaml | 2 +- .zenodo.json | 2 +- DESCRIPTION | 4 ++-- R/compareData.R | 2 +- README.md | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index 4ff5b815..90dba03e 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '5119200' +ValidationKey: '5138431' AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' - 'Warning: namespace ''.*'' is not available and has been replaced' diff --git a/.github/workflows/lucode2-check.yaml b/.github/workflows/lucode2-check.yaml index faaed457..256514d7 100644 --- a/.github/workflows/lucode2-check.yaml +++ b/.github/workflows/lucode2-check.yaml @@ -55,7 +55,7 @@ jobs: - name: Install dependencies run: | - ./run.sh install_aptget libhdf5-dev libgdal-dev + ./run.sh install_aptget libgdal-dev ./run.sh install_all ./run.sh install_r lucode2 covr diff --git a/.zenodo.json b/.zenodo.json index 9c6d1653..b2f2decd 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,6 +1,6 @@ { "title": "madrat: May All Data be Reproducible and Transparent (MADRaT) *", - "version": "2.7.0", + "version": "2.7.1", "description": "

Provides a framework which should improve reproducibility and transparency in data processing. It provides functionality such as automatic meta data creation and management, rudimentary quality management, data caching, work-flow management and data aggregation.\n * The title is a wish not a promise. By no means we expect this package to deliver everything what is needed to achieve full reproducibility and transparency, but we believe that it supports efforts in this direction.<\/p>", "creators": [ { diff --git a/DESCRIPTION b/DESCRIPTION index 2c939283..43f9f37e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: madrat Type: Package Title: May All Data be Reproducible and Transparent (MADRaT) * -Version: 2.7.0 -Date: 2021-11-29 +Version: 2.7.1 +Date: 2021-11-30 Authors@R: c(person("Jan Philipp", "Dietrich", email = "dietrich@pik-potsdam.de", role = c("aut","cre")), person("Lavinia", "Baumstark", email = "lavinia@pik-potsdam.de", role = "aut"), person("Stephen", "Wirth", email = "wirth@pik-potsdam.de", role = "aut"), diff --git a/R/compareData.R b/R/compareData.R index 5113fe28..2138946b 100644 --- a/R/compareData.R +++ b/R/compareData.R @@ -86,7 +86,7 @@ compareData <- function(x, y, tolerance = 10^-5, yearLim = NULL) { .rmag <- function(f, yearLim) { x <- try(read.magpie(f), silent = TRUE) if (!is.magpie(x)) return(NULL) else { - if (!is.null(yearLim)) x[, getYears(x, as.integer = TRUE) <= yearLim, ] + if (!is.null(yearLim)) x <- x[, getYears(x, as.integer = TRUE) <= yearLim, ] } attr(x, "comment") <- NULL return(x) diff --git a/README.md b/README.md index 65449b52..e60bcc5a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # May All Data be Reproducible and Transparent (MADRaT) * -R package **madrat**, version **2.7.0** +R package **madrat**, version **2.7.1** [![CRAN status](https://www.r-pkg.org/badges/version/madrat)](https://cran.r-project.org/package=madrat) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1115490.svg)](https://doi.org/10.5281/zenodo.1115490) [![R build status](https://github.com/pik-piam/madrat/workflows/check/badge.svg)](https://github.com/pik-piam/madrat/actions) [![codecov](https://codecov.io/gh/pik-piam/madrat/branch/master/graph/badge.svg)](https://codecov.io/gh/pik-piam/madrat) [![r-universe](https://pik-piam.r-universe.dev/badges/madrat)](https://pik-piam.r-universe.dev/ui#builds) @@ -48,7 +48,7 @@ In case of questions / problems please contact Jan Philipp Dietrich . +Dietrich J, Baumstark L, Wirth S, Giannousakis A, Rodrigues R, Bodirsky B, Kreidenweis U, Klein D, Führlich P (2021). _madrat: May All Data be Reproducible and Transparent (MADRaT)_. doi: 10.5281/zenodo.1115490 (URL: https://doi.org/10.5281/zenodo.1115490), R package version 2.7.1, . A BibTeX entry for LaTeX users is @@ -57,7 +57,7 @@ A BibTeX entry for LaTeX users is title = {madrat: May All Data be Reproducible and Transparent (MADRaT)}, author = {Jan Philipp Dietrich and Lavinia Baumstark and Stephen Wirth and Anastasis Giannousakis and Renato Rodrigues and Benjamin Leon Bodirsky and Ulrich Kreidenweis and David Klein and Pascal Führlich}, year = {2021}, - note = {R package version 2.7.0}, + note = {R package version 2.7.1}, doi = {10.5281/zenodo.1115490}, url = {https://github.com/pik-piam/madrat}, }