Skip to content

Commit

Permalink
adjustment due to VoP currency fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Debbora Leip committed Mar 6, 2024
1 parent 1ecb7da commit 36f68f1
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '751906'
ValidationKey: '771732'
AutocreateReadme: yes
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -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.3.8
date-released: '2024-03-05'
version: 0.3.9
date-released: '2024-03-06'
abstract: This package provides functions for MAgPIE input data on factor inputs to
agricultural production (with a focus on capital and labor).
authors:
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: mrfactors
Title: MADRaT based package on factor inputs
Version: 0.3.8
Date: 2024-03-05
Version: 0.3.9
Date: 2024-03-06
Authors@R:
c(person("Debbora", "Leip", , "[email protected]", role = c("aut", "cre")),
person("Edna", "Molina Bacca", role = "aut"))
Expand Down
6 changes: 3 additions & 3 deletions R/calcAgEmplILO.R
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ calcAgEmplILO <- function(subsectors = TRUE, inclFish = FALSE, inclForest = FALS

sharesAgEmpl <- .calcShares(agEmpltotal)

# shares between crop and livestock based on VoP (in mio. USDMER05, as currency is irrelevant for shares between
# shares between crop and livestock based on VoP (in mio. current USDMER, as currency is irrelevant for shares between
# sectors)
ag <- list(c("2041|Crops", "2044|Livestock"), "Gross_Production_Value_(USDMER05)_(1000_US$)")
vop <- readSource("FAO_online", "ValueOfProd")[, , ag, drop = TRUE] / 1000 # mio USDMER05
ag <- list(c("2041|Crops", "2044|Livestock"), "Gross_Production_Value_(current_thousand_US$)_(1000_US$)")
vop <- readSource("FAO_online", "ValueOfProd")[, , ag, drop = TRUE] / 1000 # mio current USDMER
getNames(vop) <- str_split(getNames(vop), "\\|", simplify = TRUE)[, 2]
vop[vop == 0] <- NA
sharesVoP <- .calcShares(vop)
Expand Down
4 changes: 2 additions & 2 deletions R/calcFractionInputsUSDA.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ calcFractionInputsUSDA <- function(products = "kcr") {
voPAll <- readSource("FAO_online", "ValueOfProd")

# mio. USD ton. VoP for crops
cropProdVop <- voPAll[, , "2041|Crops.Gross_Production_Value_(USDMER05)_(1000_US$)"]
cropProdVop <- voPAll[, , "2041|Crops.Gross_Production_Value_(constant_2014_2016_thousand_US$)_(1000_US$)"]
# mio. USD ton. VoP for livestock
lvstProdVop <- voPAll[, , "2044|Livestock.Gross_Production_Value_(USDMER05)_(1000_US$)"]
lvstProdVop <- voPAll[, , "2044|Livestock.Gross_Production_Value_(constant_2014_2016_thousand_US$)_(1000_US$)"]

# costs division between crops and livestock
sharedInput <- c("Machinery", "AG_Labour") # factors that convene livestock and crops production
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MADRaT based package on factor inputs

R package **mrfactors**, version **0.3.8**
R package **mrfactors**, version **0.3.9**

[![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)

Expand Down Expand Up @@ -38,7 +38,7 @@ In case of questions / problems please contact Debbora Leip <[email protected]

To cite package **mrfactors** in publications use:

Leip D, Molina Bacca E (2024). _mrfactors: MADRaT based package on factor inputs_. R package version 0.3.8, <URL: https://github.com/pik-piam/mrfactors>.
Leip D, Molina Bacca E (2024). _mrfactors: MADRaT based package on factor inputs_. R package version 0.3.9, <URL: https://github.com/pik-piam/mrfactors>.

A BibTeX entry for LaTeX users is

Expand All @@ -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.3.8},
note = {R package version 0.3.9},
url = {https://github.com/pik-piam/mrfactors},
}
```

0 comments on commit 36f68f1

Please sign in to comment.