Skip to content
Snippets Groups Projects
Commit bebb69e4 authored by marius-lucas braun's avatar marius-lucas braun
Browse files

dynamically created parameter name vector from output_sensitivity subdirectories

parent 62ad6d0d
No related branches found
No related tags found
No related merge requests found
Showing
with 13 additions and 17 deletions
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
File added
...@@ -25,14 +25,8 @@ rm(list = ls()) ...@@ -25,14 +25,8 @@ rm(list = ls())
# set random seed # set random seed
set.seed(127) set.seed(127)
# create elasticity, policy and income group name vectors # create parameter, policy and income group name vectors
params = c( params = readRDS("interim/params.rds")
#"esubd",
#"esubm",
#"esubva",
"CO2factor",
"esub_cons"
)
policies = c("policy", "cbam") policies = c("policy", "cbam")
inc_groups = c("lo", "mi", "hi") inc_groups = c("lo", "mi", "hi")
......
...@@ -23,17 +23,19 @@ library(parallel) ...@@ -23,17 +23,19 @@ library(parallel)
rm(list = ls()) rm(list = ls())
# this is where you put the output files from the sensitivity analysis # this is where you put the output files from the sensitivity analysis
# (use separate subdirectories for esubd(i), esubm(i), and esubva(j)) # (use separate subdirectories for each set of parameters)
dir = "C:/Users/Marius Braun/output_sensitivity" dir = "C:/Users/Marius Braun/output_sensitivity"
# string vectors for parameter, policy and income group names # string vector for parameter names based on subdirectory names
params = c( params = str_split(
# "esubd", list.dirs(dir, recursive = FALSE),
# "esubm", "output_sensitivity/",
# "esubva", simplify = T
"CO2factor", )[, 2]
"esub_cons" # save parameter name vector
) saveRDS(params, "interim/params.rds")
# string vectors for policy scenario and income group names
policies = c("policy", "cbam") policies = c("policy", "cbam")
inc_groups = c("lo", "mi", "hi") inc_groups = c("lo", "mi", "hi")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment