From 464eee5f89263bbed0140b3d9ae0f3bd30a0ad0e Mon Sep 17 00:00:00 2001 From: florianh Date: Fri, 15 Nov 2024 11:34:16 +0100 Subject: [PATCH] bugfix #2 --- .buildlibrary | 2 +- CITATION.cff | 2 +- DESCRIPTION | 2 +- R/reportTimber.R | 10 +++++----- README.md | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index ea93690..faffbcb 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '43190510' +ValidationKey: '43210552' AutocreateReadme: yes AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' diff --git a/CITATION.cff b/CITATION.cff index d5cc359..550213d 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -2,7 +2,7 @@ cff-version: 1.2.0 message: If you use this software, please cite it using the metadata from this file. type: software title: 'magpie4: MAgPIE outputs R package for MAgPIE version 4.x' -version: 2.15.5 +version: 2.15.6 date-released: '2024-11-15' abstract: Common output routines for extracting results from the MAgPIE framework (versions 4.x). diff --git a/DESCRIPTION b/DESCRIPTION index 49f6e31..fb48875 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: magpie4 Title: MAgPIE outputs R package for MAgPIE version 4.x -Version: 2.15.5 +Version: 2.15.6 Date: 2024-11-15 Authors@R: c( person("Benjamin Leon", "Bodirsky", , "bodirsky@pik-potsdam.de", role = c("aut", "cre")), diff --git a/R/reportTimber.R b/R/reportTimber.R index ad9e070..e9b4c33 100644 --- a/R/reportTimber.R +++ b/R/reportTimber.R @@ -22,18 +22,18 @@ reportTimber<-function(gdx){ dem <- collapseNames(a[,,"Demand"]) getNames(dem) <- paste0("Timber|Volumetric|Demand|Roundwood|+|",getNames(dem)) - getNames(dem) <- paste0(getNames(dem)," (Mm3/yr)") dem <- mbind(setNames(dimSums(dem,dim = 3),"Timber|Volumetric|Demand|+|Roundwood"),dem) + getNames(dem) <- paste0(getNames(dem)," (Mm3/yr)") prod <- collapseNames(a[,,"Production"]) - getNames(prod) <- paste0("Timber|Volumetric|Production|+|Roundwood|",getNames(prod)) - getNames(prod) <- paste0(getNames(prod)," (Mm3/yr)") + getNames(prod) <- paste0("Timber|Volumetric|Production|Roundwood|+|",getNames(prod)) prod <- mbind(setNames(dimSums(prod,dim = 3),"Timber|Volumetric|Production|+|Roundwood"),prod) + getNames(prod) <- paste0(getNames(prod)," (Mm3/yr)") heaven <- collapseNames(a[,,"Heaven"]) - getNames(heaven) <- paste0("Timber|Volumetric|Infeasible|+|Roundwood|",getNames(heaven)) - getNames(heaven) <- paste0(getNames(heaven)," (Mm3/yr)") + getNames(heaven) <- paste0("Timber|Volumetric|Infeasible|Roundwood|+|",getNames(heaven)) heaven <- mbind(setNames(dimSums(heaven,dim = 3),"Timber|Volumetric|Infeasible|+|Roundwood"),heaven) + getNames(heaven) <- paste0(getNames(heaven)," (Mm3/yr)") out <- mbind(dem, prod, heaven) } else {message("Disabled (no timber) ", appendLF = FALSE)} diff --git a/README.md b/README.md index 34b5cea..7bb25ba 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MAgPIE outputs R package for MAgPIE version 4.x -R package **magpie4**, version **2.15.5** +R package **magpie4**, version **2.15.6** [![CRAN status](https://www.r-pkg.org/badges/version/magpie4)](https://cran.r-project.org/package=magpie4) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1158582.svg)](https://doi.org/10.5281/zenodo.1158582) [![R build status](https://github.com/pik-piam/magpie4/workflows/check/badge.svg)](https://github.com/pik-piam/magpie4/actions) [![codecov](https://codecov.io/gh/pik-piam/magpie4/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/magpie4) [![r-universe](https://pik-piam.r-universe.dev/badges/magpie4)](https://pik-piam.r-universe.dev/builds) @@ -39,7 +39,7 @@ In case of questions / problems please contact Benjamin Leon Bodirsky , R package version 2.15.5, . +Bodirsky B, Humpenoeder F, Dietrich J, Stevanovic M, Weindl I, Karstens K, Wang X, Mishra A, Beier F, Breier J, Yalew A, Chen D, Biewald A, Wirth S, von Jeetze P, Leip D, Crawford M, Alves M (2024). _magpie4: MAgPIE outputs R package for MAgPIE version 4.x_. doi:10.5281/zenodo.1158582 , R package version 2.15.6, . A BibTeX entry for LaTeX users is @@ -48,7 +48,7 @@ A BibTeX entry for LaTeX users is title = {magpie4: MAgPIE outputs R package for MAgPIE version 4.x}, author = {Benjamin Leon Bodirsky and Florian Humpenoeder and Jan Philipp Dietrich and Miodrag Stevanovic and Isabelle Weindl and Kristine Karstens and Xiaoxi Wang and Abhijeet Mishra and Felicitas Beier and Jannes Breier and Amsalu Woldie Yalew and David Chen and Anne Biewald and Stephen Wirth and Patrick {von Jeetze} and Debbora Leip and Michael Crawford and Marcos Alves}, year = {2024}, - note = {R package version 2.15.5}, + note = {R package version 2.15.6}, url = {https://github.com/pik-piam/magpie4}, doi = {10.5281/zenodo.1158582}, }