From 9df48ca7e2d0ccb007fa6dbab87d98610b5bc283 Mon Sep 17 00:00:00 2001 From: florianh Date: Thu, 24 Oct 2024 11:41:16 +0200 Subject: [PATCH] bugfix reporting --- .buildlibrary | 2 +- CITATION.cff | 2 +- DESCRIPTION | 2 +- R/reportLandConservation.R | 2 +- R/reportLandUse.R | 2 +- README.md | 8 ++++---- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index 9066d44..b578e1f 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '42842800' +ValidationKey: '42862820' AutocreateReadme: yes AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' diff --git a/CITATION.cff b/CITATION.cff index 7cb8660..fb7dc5e 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.14.0 +version: 2.14.1 date-released: '2024-10-24' abstract: Common output routines for extracting results from the MAgPIE framework (versions 4.x). diff --git a/DESCRIPTION b/DESCRIPTION index 4625110..0091b82 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.14.0 +Version: 2.14.1 Date: 2024-10-24 Authors@R: c( person("Benjamin Leon", "Bodirsky", , "bodirsky@pik-potsdam.de", role = c("aut", "cre")), diff --git a/R/reportLandConservation.R b/R/reportLandConservation.R index b5dc7c7..b7941de 100644 --- a/R/reportLandConservation.R +++ b/R/reportLandConservation.R @@ -47,7 +47,7 @@ reportLandConservation <- function(gdx) { x <- mbind(x, setNames(restored[, , "other"], paste0("Resources|Land Cover Conserved|", reportingnames("other"), "|+|Restored (million ha)"))) # ------ Annual Restoration - annRestored <- landConservation(gdx, level = "regglo", annualRestor = TRUE) + annRestored <- landConservation(gdx, level = "regglo", annualRestor = TRUE)[,,"restore"] x <- mbind(x, setNames(annRestored[, , "crop"], paste0("Resources|Land Cover Conserved|", reportingnames("crop"), "|Restored annually (million ha/yr)"))) x <- mbind(x, setNames(annRestored[, , "past"], paste0("Resources|Land Cover Conserved|", reportingnames("past"), "|Restored annually (million ha/yr)"))) diff --git a/R/reportLandUse.R b/R/reportLandUse.R index 0cc9abe..cb84ffd 100644 --- a/R/reportLandUse.R +++ b/R/reportLandUse.R @@ -37,7 +37,7 @@ reportLandUse <- function(gdx) { x <- mbind(x,setNames(a[,,"urban"],paste0("Resources|Land Cover|+|", reportingnames("urban")," (million ha)"))) x <- mbind(x,setNames(dimSums(a[,,c("other_initial","other_recovered","other_restored")],dim=3),paste0("Resources|Land Cover|+|", reportingnames("other")," (million ha)"))) x <- mbind(x,setNames(a[,,"other_initial"],paste0("Resources|Land Cover|", reportingnames("other"),"|Initial (million ha)"))) - x <- mbind(x,setNames(a[,,"recovered"],paste0("Resources|Land Cover|", reportingnames("other"),"|Recovered (million ha)"))) + x <- mbind(x,setNames(a[,,"other_recovered"],paste0("Resources|Land Cover|", reportingnames("other"),"|Recovered (million ha)"))) x <- mbind(x,setNames(a[,,"other_restored"],paste0("Resources|Land Cover|", reportingnames("other"),"|Restored (million ha)"))) x <- mbind(x,setNames(dimSums(a[,,c("primforest","secdforest","forestry_aff","forestry_ndc","forestry_plant")],dim=3),paste0("Resources|Land Cover|+|", reportingnames("forest")," (million ha)"))) x <- mbind(x,setNames(dimSums(a[,,c("primforest","secdforest")],dim=3), paste0("Resources|Land Cover|Forest|+|", reportingnames("natrforest")," (million ha)"))) diff --git a/README.md b/README.md index bed5dc9..dd8a8bf 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.14.0** +R package **magpie4**, version **2.14.1** [![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.14.0, . +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.14.1, . A BibTeX entry for LaTeX users is @@ -48,8 +48,8 @@ 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.14.0}, - doi = {10.5281/zenodo.1158582}, + note = {R package version 2.14.1}, url = {https://github.com/pik-piam/magpie4}, + doi = {10.5281/zenodo.1158582}, } ```