Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix #33

Merged
merged 2 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading