From 29f1f6f55a5a16f1d4c68102d92e841e3fea785e Mon Sep 17 00:00:00 2001 From: Debbora Leip Date: Thu, 7 Mar 2024 13:27:39 +0100 Subject: [PATCH] bugfix in calcValidFactorReqShares --- .buildlibrary | 2 +- CITATION.cff | 4 ++-- DESCRIPTION | 4 ++-- R/calcValidFactorReqShares.R | 3 +++ README.md | 6 +++--- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index b6265a0..475e87e 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '50693577' +ValidationKey: '50738996' AutocreateReadme: yes AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' diff --git a/CITATION.cff b/CITATION.cff index 00c7fd7..fccdcfe 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -2,8 +2,8 @@ cff-version: 1.2.0 message: If you use this software, please cite it using the metadata from this file. type: software title: 'mrvalidation: madrat data preparation for validation purposes' -version: 2.56.3 -date-released: '2024-02-26' +version: 2.56.4 +date-released: '2024-03-07' abstract: Package contains routines to prepare data for validation exercises. authors: - family-names: Bodirsky diff --git a/DESCRIPTION b/DESCRIPTION index 1145f34..4924861 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: mrvalidation Title: madrat data preparation for validation purposes -Version: 2.56.3 -Date: 2024-02-26 +Version: 2.56.4 +Date: 2024-03-07 Authors@R: c( person("Benjamin Leon", "Bodirsky", , "bodirsky@pik-potsdam.de", role = c("aut", "cre")), person("Stephen", "Wirth", role = "aut"), diff --git a/R/calcValidFactorReqShares.R b/R/calcValidFactorReqShares.R index bbda498..8074a1f 100644 --- a/R/calcValidFactorReqShares.R +++ b/R/calcValidFactorReqShares.R @@ -23,6 +23,9 @@ calcValidFactorReqShares <- function(subtype = "crop") { out <- mbind(out, setNames(1 - out, paste0("Factor requirement shares|", stringr::str_to_title(subtype), " products|+|Labor requirement share (%)"))) + # convert to percentage + out <- out * 100 + out <- add_dimension(out, dim = 3.1, add = "scenario", nm = "historical") out <- add_dimension(out, dim = 3.2, add = "model", nm = "USDA") diff --git a/README.md b/README.md index 8ee5fc6..e38d322 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # madrat data preparation for validation purposes -R package **mrvalidation**, version **2.56.3** +R package **mrvalidation**, version **2.56.4** [![CRAN status](https://www.r-pkg.org/badges/version/mrvalidation)](https://cran.r-project.org/package=mrvalidation) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4317826.svg)](https://doi.org/10.5281/zenodo.4317826) [![R build status](https://github.com/pik-piam/mrvalidation/workflows/check/badge.svg)](https://github.com/pik-piam/mrvalidation/actions) [![codecov](https://codecov.io/gh/pik-piam/mrvalidation/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/mrvalidation) [![r-universe](https://pik-piam.r-universe.dev/badges/mrvalidation)](https://pik-piam.r-universe.dev/builds) @@ -39,7 +39,7 @@ In case of questions / problems please contact Benjamin Leon Bodirsky . +Bodirsky B, Wirth S, Karstens K, Humpenoeder F, Stevanovic M, Mishra A, Biewald A, Weindl I, Beier F, Chen D, Crawford M, Leip D, Molina Bacca E, Kreidenweis U, W. Yalew A, von Jeetze P, Wang X, Dietrich J, Alves M (2024). _mrvalidation: madrat data preparation for validation purposes_. doi: 10.5281/zenodo.4317826 (URL: https://doi.org/10.5281/zenodo.4317826), R package version 2.56.4, . A BibTeX entry for LaTeX users is @@ -48,7 +48,7 @@ A BibTeX entry for LaTeX users is title = {mrvalidation: madrat data preparation for validation purposes}, author = {Benjamin Leon Bodirsky and Stephen Wirth and Kristine Karstens and Florian Humpenoeder and Mishko Stevanovic and Abhijeet Mishra and Anne Biewald and Isabelle Weindl and Felicitas Beier and David Chen and Michael Crawford and Debbora Leip and Edna {Molina Bacca} and Ulrich Kreidenweis and Amsalu {W. Yalew} and Patrick {von Jeetze} and Xiaoxi Wang and Jan Philipp Dietrich and Marcos Alves}, year = {2024}, - note = {R package version 2.56.3}, + note = {R package version 2.56.4}, doi = {10.5281/zenodo.4317826}, url = {https://github.com/pik-piam/mrvalidation}, }