Skip to content

Commit

Permalink
correctly provide a vector to setkeyv
Browse files Browse the repository at this point in the history
  • Loading branch information
Loisel committed Sep 28, 2022
1 parent 38717b5 commit 69d555a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/readEDGETransport.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ readEDGETransport <- function(subtype = "logit_exponent") {
}

create_copy_demscens <- function(dt) {
setkeyv(dt, "DEM_scenario", "GDP_scenario", "EDGE_scenario")
setkeyv(dt, c("DEM_scenario", "GDP_scenario", "EDGE_scenario"))
## Workaround for NAVIGATE: copy-create demand scenarios which we do not supply by EDGE-T
dt <- rbind(dt,
dt[.("gdp_SSP2EU", "gdp_SSP2EU", "NAV_ele"), nomatch=NULL][
Expand All @@ -73,7 +73,7 @@ readEDGETransport <- function(subtype = "logit_exponent") {

compress_magpie <- function(dt, ...) {
dt <- create_copy_demscens(dt)
setkeyv(dt, "EDGE_scenario", "DEM_scenario", "GDP_scenario")
setkeyv(dt, c("EDGE_scenario", "DEM_scenario", "GDP_scenario"))
mdata <- NULL
for (i in unique(dt$EDGE_scenario)) {
for (j in unique(dt$DEM_scenario)) {
Expand Down

0 comments on commit 69d555a

Please sign in to comment.