diff --git a/.buildlibrary b/.buildlibrary index ad20d4d..db9b21b 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '1100550' +ValidationKey: '1200840' AutocreateReadme: yes AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' diff --git a/CITATION.cff b/CITATION.cff index 8c40cc1..8d909fb 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: 'mrfactors: MADRaT based package on factor inputs' -version: 0.5.5 -date-released: '2024-10-14' +version: 0.6.0 +date-released: '2024-10-18' abstract: This package provides functions for MAgPIE input data on factor inputs to agricultural production (with a focus on capital and labor). authors: diff --git a/DESCRIPTION b/DESCRIPTION index ef69ee2..8a2dc19 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: mrfactors Title: MADRaT based package on factor inputs -Version: 0.5.5 -Date: 2024-10-14 +Version: 0.6.0 +Date: 2024-10-18 Authors@R: c(person("Debbora", "Leip", , "leip@pik-potsdam.de", role = c("aut", "cre")), person("Edna", "Molina Bacca", role = "aut")) @@ -16,7 +16,8 @@ Depends: madrat (>= 3.10.0), mrdrivers (>= 1.0.0), mstools (>= 0.6.0), - mrcommons (>= 1.41.0) + mrcommons (>= 1.41.0), + mrlandcore (>= 1.2.0) Imports: dplyr, magpiesets, diff --git a/NAMESPACE b/NAMESPACE index 2cd51e7..1f81ffc 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -5,6 +5,7 @@ import(madrat) import(magclass) import(mrcommons) import(mrdrivers) +import(mrlandcore) import(mstools) importFrom(GDPuc,toolConvertGDP) importFrom(dplyr,"%>%") diff --git a/R/calcPricesProducer.R b/R/calcPricesProducer.R index 3ac1219..1c6384c 100644 --- a/R/calcPricesProducer.R +++ b/R/calcPricesProducer.R @@ -29,7 +29,7 @@ calcPricesProducer <- function(products = "kcr", calculation = "VoP", weighting # weight: Production if (weighting == "production") { - mappingFAO <- toolGetMapping("FAO2LUH2MAG_croptypes.csv", type = "sectoral", where = "mrcommons") + mappingFAO <- toolGetMapping("FAO2LUH2MAG_croptypes.csv", type = "sectoral", where = "mrlandcore") itemsIntersect <- intersect(getNames(pricesProdFAO), unique(mappingFAO$ProductionItem)) weightProd <- collapseNames(readSource("FAO_online", "Crop")[, , "production"]) getNames(weightProd)[getNames(weightProd) == "254|Oil palm fruit"] <- "254|Oil, palm fruit" diff --git a/R/calcVoPcrops.R b/R/calcVoPcrops.R index fb2ebeb..8dac51e 100644 --- a/R/calcVoPcrops.R +++ b/R/calcVoPcrops.R @@ -25,7 +25,7 @@ calcVoPcrops <- function(fillGaps = TRUE, unit = "constant 2017 US$MER") { getNames(vopAll)[getNames(vopAll) == "254|Oil palm fruit"] <- "254|Oil, palm fruit" # items for aggregation - mappingFAO <- toolGetMapping("FAO2LUH2MAG_croptypes.csv", type = "sectoral", where = "mrcommons") + mappingFAO <- toolGetMapping("FAO2LUH2MAG_croptypes.csv", type = "sectoral", where = "mrlandcore") itemsIntersect <- intersect(getNames(vopAll), unique(mappingFAO$ProductionItem)) mappingFAO <- mappingFAO[mappingFAO$ProductionItem %in% itemsIntersect, ] diff --git a/R/imports.R b/R/imports.R index 2f21143..70336a1 100644 --- a/R/imports.R +++ b/R/imports.R @@ -1,4 +1,4 @@ # Generated by lucode2: do not edit by hand -#' @import GDPuc magclass madrat mrdrivers mstools mrcommons +#' @import GDPuc magclass madrat mrdrivers mstools mrcommons mrlandcore NULL diff --git a/README.md b/README.md index 53006a8..4254b42 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MADRaT based package on factor inputs -R package **mrfactors**, version **0.5.5** +R package **mrfactors**, version **0.6.0** [![CRAN status](https://www.r-pkg.org/badges/version/mrfactors)](https://cran.r-project.org/package=mrfactors) [![R build status](https://github.com/pik-piam/mrfactors/workflows/check/badge.svg)](https://github.com/pik-piam/mrfactors/actions) [![codecov](https://codecov.io/gh/pik-piam/mrfactors/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/mrfactors) [![r-universe](https://pik-piam.r-universe.dev/badges/mrfactors)](https://pik-piam.r-universe.dev/builds) @@ -38,7 +38,7 @@ In case of questions / problems please contact Debbora Leip . +Leip D, Molina Bacca E (2024). _mrfactors: MADRaT based package on factor inputs_. R package version 0.6.0, . A BibTeX entry for LaTeX users is @@ -47,7 +47,7 @@ A BibTeX entry for LaTeX users is title = {mrfactors: MADRaT based package on factor inputs}, author = {Debbora Leip and Edna {Molina Bacca}}, year = {2024}, - note = {R package version 0.5.5}, + note = {R package version 0.6.0}, url = {https://github.com/pik-piam/mrfactors}, } ```