From c35791350730f84503e1454fa5473ef9800360cf Mon Sep 17 00:00:00 2001 From: Patrick von Jeetze Date: Fri, 2 Feb 2024 16:50:09 +0100 Subject: [PATCH] another bugfix --- .buildlibrary | 2 +- CITATION.cff | 2 +- DESCRIPTION | 2 +- R/calcCroplandTreecover.R | 4 ++-- R/calcSNVTargetCropland.R | 4 ++-- README.md | 6 +++--- man/calcCroplandTreecover.Rd | 2 +- man/calcSNVTargetCropland.Rd | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index 36031d5..5c5a658 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '10489905' +ValidationKey: '10509660' 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 eebacac..7a21ed4 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: 'mrland: MadRaT land data package' -version: 0.53.1 +version: 0.53.2 date-released: '2024-02-02' abstract: The package provides land related data via the madrat framework. authors: diff --git a/DESCRIPTION b/DESCRIPTION index 2896d51..09a2c14 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: mrland Title: MadRaT land data package -Version: 0.53.1 +Version: 0.53.2 Date: 2024-02-02 Authors@R: c( person("Jan Philipp", "Dietrich", , "dietrich@pik-potsdam.de", role = c("aut", "cre")), diff --git a/R/calcCroplandTreecover.R b/R/calcCroplandTreecover.R index 5ba9139..cb45163 100644 --- a/R/calcCroplandTreecover.R +++ b/R/calcCroplandTreecover.R @@ -13,7 +13,7 @@ #' #' @examples #' \dontrun{ -#' calcOutput("calcCroplandTreecover", aggregate = FALSE) +#' calcOutput("CroplandTreecover", aggregate = FALSE) #' } #' #' @importFrom mrcommons toolCoord2Isocell @@ -32,7 +32,7 @@ calcCroplandTreecover <- function(maginput = TRUE, cells = "magpiecell") { # cropland treecover area is corrected to make sure that it is not # larger than cropland area reported by LUH - out <- pmax(treecover, luh[, , "crop"]) + out <- pmin(treecover, luh[, , "crop"]) } else { out <- treecover } diff --git a/R/calcSNVTargetCropland.R b/R/calcSNVTargetCropland.R index 5c028ed..60ba46c 100644 --- a/R/calcSNVTargetCropland.R +++ b/R/calcSNVTargetCropland.R @@ -14,7 +14,7 @@ #' #' @examples #' \dontrun{ -#' calcOutput("calcSNVTargetCropland", aggregate = FALSE) +#' calcOutput("SNVTargetCropland", aggregate = FALSE) #' } #' #' @importFrom mrcommons toolCoord2Isocell @@ -33,7 +33,7 @@ calcSNVTargetCropland <- function(maginput = TRUE, cells = "magpiecell") { # SNV target cropland area is corrected to make sure that it is not # larger than cropland area reported by LUH - out <- pmax(targetCropland, luh[, , "crop"]) + out <- pmin(targetCropland, luh[, , "crop"]) } else { out <- targetCropland } diff --git a/README.md b/README.md index 7be1288..5c41c21 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MadRaT land data package -R package **mrland**, version **0.53.1** +R package **mrland**, version **0.53.2** [![CRAN status](https://www.r-pkg.org/badges/version/mrland)](https://cran.r-project.org/package=mrland) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3822083.svg)](https://doi.org/10.5281/zenodo.3822083) [![R build status](https://github.com/pik-piam/mrland/workflows/check/badge.svg)](https://github.com/pik-piam/mrland/actions) [![codecov](https://codecov.io/gh/pik-piam/mrland/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/mrland) [![r-universe](https://pik-piam.r-universe.dev/badges/mrland)](https://pik-piam.r-universe.dev/builds) @@ -39,7 +39,7 @@ In case of questions / problems please contact Jan Philipp Dietrich , R package version 0.53.1, . +Dietrich J, Mishra A, Weindl I, Bodirsky B, Wang X, Baumstark L, Kreidenweis U, Klein D, Steinmetz N, Chen D, Humpenoeder F, von Jeetze P, Wirth S, Beier F, Hoetten D (2024). _mrland: MadRaT land data package_. doi:10.5281/zenodo.3822083 , R package version 0.53.2, . A BibTeX entry for LaTeX users is @@ -48,7 +48,7 @@ A BibTeX entry for LaTeX users is title = {mrland: MadRaT land data package}, author = {Jan Philipp Dietrich and Abhijeet Mishra and Isabelle Weindl and Benjamin Leon Bodirsky and Xiaoxi Wang and Lavinia Baumstark and Ulrich Kreidenweis and David Klein and Nele Steinmetz and David Chen and Florian Humpenoeder and Patrick {von Jeetze} and Stephen Wirth and Felicitas Beier and David Hoetten}, year = {2024}, - note = {R package version 0.53.1}, + note = {R package version 0.53.2}, doi = {10.5281/zenodo.3822083}, url = {https://github.com/pik-piam/mrland}, } diff --git a/man/calcCroplandTreecover.Rd b/man/calcCroplandTreecover.Rd index f557f20..9ea1947 100644 --- a/man/calcCroplandTreecover.Rd +++ b/man/calcCroplandTreecover.Rd @@ -20,7 +20,7 @@ Returns area on cropland covered by trees (Mha). } \examples{ \dontrun{ -calcOutput("calcCroplandTreecover", aggregate = FALSE) +calcOutput("CroplandTreecover", aggregate = FALSE) } } diff --git a/man/calcSNVTargetCropland.Rd b/man/calcSNVTargetCropland.Rd index 3ae38dc..6023cb0 100644 --- a/man/calcSNVTargetCropland.Rd +++ b/man/calcSNVTargetCropland.Rd @@ -21,7 +21,7 @@ semi-natural vegetation in farmed landscapes. } \examples{ \dontrun{ -calcOutput("calcSNVTargetCropland", aggregate = FALSE) +calcOutput("SNVTargetCropland", aggregate = FALSE) } }