diff options
| -rw-r--r-- | R/build_scenarios.R | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/R/build_scenarios.R b/R/build_scenarios.R index c5225059..59b845e1 100644 --- a/R/build_scenarios.R +++ b/R/build_scenarios.R @@ -22,8 +22,9 @@ if(length(args) >= 1){ }
if(length(args) >=2){
- dealnames <- args[-1]
- reinvflags <- rep_len(TRUE, length(dealnames))
+ argslist <- strsplit(args[-1], ",")
+ dealnames <- unlist(lapply(argslist, function(x)[1]))
+ reinvflags <- unlist(lapply(argslist, function(x)[2]))
}else{
data <- read.table(file.path(root.dir, "scripts", "scenarios.txt"),
colClasses=c("character", "logical"))
|
