From adaa1a79224092715a0987bff1f55a83fbe09a3c Mon Sep 17 00:00:00 2001 From: Johannes Koch Date: Mon, 9 Sep 2024 16:05:31 +0200 Subject: [PATCH 1/2] Fixes #32 --- R/transform_user_input.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/transform_user_input.R b/R/transform_user_input.R index 5b86863..5c0d222 100644 --- a/R/transform_user_input.R +++ b/R/transform_user_input.R @@ -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) From 4dc6aace565c585ec993ffe9d649dca18567091e Mon Sep 17 00:00:00 2001 From: Johannes Koch Date: Mon, 9 Sep 2024 16:08:40 +0200 Subject: [PATCH 2/2] Bump version --- .buildlibrary | 2 +- .pre-commit-config.yaml | 2 +- CITATION.cff | 4 ++-- DESCRIPTION | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index e7aff05..7dfc8c7 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '2073760' +ValidationKey: '2097375' AutocreateReadme: no AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 62f13da..7ccf77e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/CITATION.cff b/CITATION.cff index 1dac4c7..c565227 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: '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. diff --git a/DESCRIPTION b/DESCRIPTION index 1cc2579..ccdfcd7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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