From 4122e72e8abb70cd9436a242d738e89eb4fc5027 Mon Sep 17 00:00:00 2001 From: Oloo Date: Wed, 22 May 2024 16:19:40 +0300 Subject: [PATCH] excel output for comaper scenarios --- R/compare_scenario.R | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/R/compare_scenario.R b/R/compare_scenario.R index 8bad979..254537b 100644 --- a/R/compare_scenario.R +++ b/R/compare_scenario.R @@ -232,6 +232,12 @@ compare_scenario <- function(baseRun, outFile, oDir2){ results <- scenarioList %>% dplyr::bind_rows() + # Save results in excel + excel_output_path <- paste0(oDir2, "/scenario_comparison.xlsx") + write.xlsx(results, excel_output_path, overwrite = TRUE) + + # Generate plots + for(i in 2:ncol(results)){ datos <- results %>% select(1, all_of(i))