aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--R/build_portfolios.R4
-rw-r--r--R/build_scenarios.R4
2 files changed, 4 insertions, 4 deletions
diff --git a/R/build_portfolios.R b/R/build_portfolios.R
index 25a5318e..f027d06e 100644
--- a/R/build_portfolios.R
+++ b/R/build_portfolios.R
@@ -16,8 +16,8 @@ source(file.path(root.dir, "code", "R", "cds_functions_generic.R"))
if(length(args) >=2){
argslist <- strsplit(args[-1], ",")
- dealnames <- unlist(lapply(argslist, function(x)[1]))
- reinvflags <- unlist(lapply(argslist, function(x)[2]))
+ dealnames <- unlist(lapply(argslist, function(x)x[1]))
+ reinvflags <- unlist(lapply(argslist, function(x)x[2]))
}else{
data <- read.table(file.path(root.dir, "scripts", "cusips_to_price.txt"))
dealnames <- dealnamefromcusip(data$V1)
diff --git a/R/build_scenarios.R b/R/build_scenarios.R
index 59b845e1..ea0f473e 100644
--- a/R/build_scenarios.R
+++ b/R/build_scenarios.R
@@ -23,8 +23,8 @@ if(length(args) >= 1){
if(length(args) >=2){
argslist <- strsplit(args[-1], ",")
- dealnames <- unlist(lapply(argslist, function(x)[1]))
- reinvflags <- unlist(lapply(argslist, function(x)[2]))
+ dealnames <- unlist(lapply(argslist, function(x)x[1]))
+ reinvflags <- unlist(lapply(argslist, function(x)x[2]))
}else{
data <- read.table(file.path(root.dir, "scripts", "scenarios.txt"),
colClasses=c("character", "logical"))