Skip to content

Commit

Permalink
fix R complaining about if in output.R
Browse files Browse the repository at this point in the history
```
Error in all(is.na(output)) || output == "NA" :
  'length = 5' in coercion to 'logical(1)'
Calls: prepareAndRun -> run -> sys.source -> eval -> eval
```
  • Loading branch information
orichters committed Jun 25, 2024
1 parent 7073dcc commit aa01920
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/70_water/heat/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ p70_cap_vintages(ttot, all_regi, all_te, ttot2) "capacity build
p70_cap_vintages_share(ttot, all_regi, all_te, ttot2) "fraction of capacity build in ttot2 still standing in ttot out of total capacity in ttot. Unit: 0-1"
p70_heat(ttot,all_regi,all_enty,all_enty,all_te) "excess heat. Unit: TWa"
p70_water_con(all_regi, all_te, coolte70) "water consumption coefficients per excess heat. Unit: m3/MWh"
p70_water_wtd(all_regi, all_te, coolte70) "water withdrawal coefficients per excess heat. Unit: m3/MWh)"
p70_water_wtd(all_regi, all_te, coolte70) "water withdrawal coefficients per excess heat. Unit: m3/MWh"

p70_water_output(ttot,all_regi,descr_water_ext) "output"

Expand Down
2 changes: 1 addition & 1 deletion output.R
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ if (comp %in% c("comparison", "export")) {

# output creation for --testOneRegi was switched off in start.R in this commit:
# https://github.com/remindmodel/remind/commit/5905d9dd814b4e4a62738d282bf1815e6029c965
if (all(is.na(output)) || output == "NA") {
if (all(output %in% c(NA, "NA"))) {
message("\nNo output generation, as output was set to NA, as for example for --testOneRegi or --quick.")
} else {
message("\nStarting output generation for ", outputdir, "\n")
Expand Down

0 comments on commit aa01920

Please sign in to comment.