diff --git a/.buildlibrary b/.buildlibrary index 01d893a..cd55672 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '4360620' +ValidationKey: '4380441' AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' - 'Warning: namespace ''.*'' is not available and has been replaced' diff --git a/CITATION.cff b/CITATION.cff index 052ada8..3fb8eb3 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: 'mrsoil: MadRat Soil Organic Carbon Budget Library' -version: 2.2.0 +version: 2.2.1 date-released: '2024-04-08' abstract: This packages provides functions for soil organic carbon budget for mineral soils using the steady-state method (Tier 2) of the 2019 Refinement to the 2006 diff --git a/DESCRIPTION b/DESCRIPTION index c6fb17c..a2de1d6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: mrsoil Type: Package Title: MadRat Soil Organic Carbon Budget Library -Version: 2.2.0 +Version: 2.2.1 Date: 2024-04-08 Authors@R: c(person("Kristine", "Karstens", email = "karstens@pik-potsdam.de", role = c("aut","cre")), person("Jan Philipp", "Dietrich", email = "dietrich@pik-potsdam.de", role = "aut")) diff --git a/R/calcCarbonInputMultiplier.R b/R/calcCarbonInputMultiplier.R index db1b75d..eee791a 100644 --- a/R/calcCarbonInputMultiplier.R +++ b/R/calcCarbonInputMultiplier.R @@ -51,13 +51,13 @@ calcCarbonInputMultiplier <- function(inputType = "kcr") { # get weights if (inputType %in% c("kcr", "generic")) { - weight <- collapseNames(calcOutput("ResBiomass", cellular = TRUE, aggregate = FALSE)[, "y1995", "c"]) - weight <- ifelse(inputType == "kcr", - dimSums(weight, dim = 3.1), # for kcr - setNames(dimSums(weight, dim = 3), "generic")) # for 'generic' + if (inputType == "kcr") { + weight <- dimSums(weight, dim = 3.1) # for kcr + } else { + weight <- setNames(dimSums(weight, dim = 3), "generic") # for 'generic' + } } else if (inputType == "kli") { - weight <- collapseNames(calcOutput("CarbonManure", aggregate = FALSE)[, "y1995", "c"]) } else { stop("inputType setting unknown.") diff --git a/README.md b/README.md index 198c5d7..23ec1cb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MadRat Soil Organic Carbon Budget Library -R package **mrsoil**, version **2.2.0** +R package **mrsoil**, version **2.2.1** [![CRAN status](https://www.r-pkg.org/badges/version/mrsoil)](https://cran.r-project.org/package=mrsoil) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4317933.svg)](https://doi.org/10.5281/zenodo.4317933) [![R build status](https://github.com/pik-piam/mrsoil/workflows/check/badge.svg)](https://github.com/pik-piam/mrsoil/actions) [![codecov](https://codecov.io/gh/pik-piam/mrsoil/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/mrsoil) [![r-universe](https://pik-piam.r-universe.dev/badges/mrsoil)](https://pik-piam.r-universe.dev/builds) @@ -38,7 +38,7 @@ In case of questions / problems please contact Kristine Karstens , R package version 2.2.0, . +Karstens K, Dietrich J (2024). _mrsoil: MadRat Soil Organic Carbon Budget Library_. doi:10.5281/zenodo.4317933 , R package version 2.2.1, . A BibTeX entry for LaTeX users is @@ -47,7 +47,7 @@ A BibTeX entry for LaTeX users is title = {mrsoil: MadRat Soil Organic Carbon Budget Library}, author = {Kristine Karstens and Jan Philipp Dietrich}, year = {2024}, - note = {R package version 2.2.0}, + note = {R package version 2.2.1}, doi = {10.5281/zenodo.4317933}, url = {https://github.com/pik-piam/mrsoil}, }