Skip to content

Commit

Permalink
Merge pull request #33 from johanneskoch94/bug_fix
Browse files Browse the repository at this point in the history
Bug fix
  • Loading branch information
johanneskoch94 authored Sep 9, 2024
2 parents f01f150 + 4dc6aac commit 081e006
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '2073760'
ValidationKey: '2097375'
AutocreateReadme: no
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
- id: mixed-line-ending

- repo: https://github.com/lorenzwalthert/precommit
rev: 7910e0323d7213f34275a7a562b9ef0fde8ce1b9 # frozen: v0.4.2
rev: bae853d82da476eee0e0a57960ee6b741a3b3fb7 # frozen: v0.4.3
hooks:
- id: parsable-R
- id: deps-in-desc
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: 'GDPuc: Easily Convert GDP Data'
version: 1.0.4
date-released: '2024-08-05'
version: 1.0.5
date-released: '2024-09-09'
abstract: Convert GDP time series data from one unit to another. All common GDP units
are included, i.e. current and constant local currency units, US$ via market exchange
rates and international dollars via purchasing power parities.
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: GDPuc
Title: Easily Convert GDP Data
Version: 1.0.4
Date: 2024-08-05
Version: 1.0.5
Date: 2024-09-09
Authors@R:
person("Johannes", "Koch", , "jokoch@pik-potsdam.de", role = c("aut", "cre"))
Description: Convert GDP time series data from one unit to
Expand Down
4 changes: 2 additions & 2 deletions R/transform_user_input.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ transform_internal <- function(x, gdp, with_regions, require_year_column) {
# Check if the original magpie object had 2 spatial dimensions
spat2 <- all(grepl("\\.", magclass::getItems(gdp, dim = 1)))
if (!spat2) {
x <- magclass::as.magpie(x, spatial = "iso3c", temporal = "year")
x <- magclass::as.magpie(x, spatial = "iso3c", temporal = "year", datacol = "value")
} else {
x <- magclass::as.magpie(x, spatial = c("iso3c", "spatial2"), temporal = "year")
x <- magclass::as.magpie(x, spatial = c("iso3c", "spatial2"), temporal = "year", datacol = "value")
}
magclass::getSets(x) <- magclass::getSets(gdp)
return(x)
Expand Down

0 comments on commit 081e006

Please sign in to comment.