Skip to content

Commit

Permalink
fixed toolAggregate warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Debbora Leip committed Sep 23, 2024
1 parent 66adc27 commit a3ef79e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '998550'
ValidationKey: '1019439'
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.5.0
date-released: '2024-09-05'
version: 0.5.1
date-released: '2024-09-23'
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.5.0
Date: 2024-09-05
Version: 0.5.1
Date: 2024-09-23
Authors@R:
c(person("Debbora", "Leip", , "[email protected]", role = c("aut", "cre")),
person("Edna", "Molina Bacca", role = "aut"))
Expand Down
6 changes: 4 additions & 2 deletions R/calcHourlyLaborCosts.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ calcHourlyLaborCosts <- function(datasource = "USDA_FAO", dataVersionILO = "Aug2
weight <- hourlyCosts
weight[weight != 0] <- 1

hourlyCosts <- toolAggregate(hourlyCosts, rel = mapping, weight = weight, from = "from", to = "to", dim = 3.1)
hourlyCosts <- toolAggregate(hourlyCosts, rel = mapping, weight = weight, from = "from",
to = "to", dim = 3.1, zeroWeight = "allow")

# aggregate the two revisions
mapping <- data.frame(from = c("Agriculture, forestry and fishing",
Expand All @@ -61,7 +62,8 @@ calcHourlyLaborCosts <- function(datasource = "USDA_FAO", dataVersionILO = "Aug2
"Agriculture, forestry and fishing"))
weight <- hourlyCosts
weight[weight != 0] <- 1
hourlyCosts <- toolAggregate(hourlyCosts, rel = mapping, weight = weight, from = "from", to = "to", dim = 3.1)
hourlyCosts <- toolAggregate(hourlyCosts, rel = mapping, weight = weight, from = "from",
to = "to", dim = 3.1, zeroWeight = "allow")

# add data for India for 2000-2017 (except 2006), based on data from the Commission of Agricultural Costs and
# Prices (https://cacp.dacnet.nic.in/)
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.5.0**
R package **mrfactors**, version **0.5.1**

[![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.5.0, <https://github.com/pik-piam/mrfactors>.
Leip D, Molina Bacca E (2024). _mrfactors: MADRaT based package on factor inputs_. R package version 0.5.1, <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.5.0},
note = {R package version 0.5.1},
url = {https://github.com/pik-piam/mrfactors},
}
```

0 comments on commit a3ef79e

Please sign in to comment.