Skip to content

Commit

Permalink
Replace selecting via [[1]] by unlist()
Browse files Browse the repository at this point in the history
  • Loading branch information
dklein-pik committed Feb 27, 2024
1 parent 3b7f82f commit 686c6b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/start/configureCfg.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ configureCfg <- function(icfg, iscen, iscenarios, verboseGamsCompile = TRUE) {

# Set reporting script
if ("output" %in% names(iscenarios) && ! is.na(iscenarios[iscen, "output"])) {
scenoutput <- gsub('c\\("|\\)|"', '', trimws(strsplit(iscenarios[iscen, "output"],',')[[1]]))
scenoutput <- gsub('c\\("|\\)|"', '', trimws(unlist(strsplit(iscenarios[iscen, "output"], split = ','))))
icfg$output <- unique(c(if ("cfg$output" %in% scenoutput) icfg$output, setdiff(scenoutput, "cfg$output")))
}

Expand Down

0 comments on commit 686c6b5

Please sign in to comment.