diff options
Diffstat (limited to 'R')
| -rw-r--r-- | R/tranches_RV_BC.R | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/R/tranches_RV_BC.R b/R/tranches_RV_BC.R index af6aec9c..58a974a6 100644 --- a/R/tranches_RV_BC.R +++ b/R/tranches_RV_BC.R @@ -42,12 +42,11 @@ source(file.path(root.dir, "code", "R", "serenitasdb.R")) source(file.path(root.dir, "code", "R", "creditIndex.R"))
source(file.path(root.dir, "code", "R", "tranche_functions.R"))
-for(i in seq_along(runs$name1)){
- with(runs,
- {index.name1 <<- name1[i]
- index.name2 <<- name2[i]
- tenor1 <<- tenor1[i]
- tenor2 <<- tenor2[i]})
+for(r in runs$mappings){
+ index.name1 <- r[1]
+ tenor1 <- r[2]
+ index.name2 <- r[3]
+ tenor2 <- r[4]
filename <- file.path(root.dir,"Tranche_data","Runs",
paste0(paste(index.name2, tenor2, "using", index.name1, tenor1),".csv"))
if(!file.exists(filename)){
|
