aboutsummaryrefslogtreecommitdiffstats
path: root/R/intex_deal_functions.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/intex_deal_functions.R')
-rw-r--r--R/intex_deal_functions.R5
1 files changed, 4 insertions, 1 deletions
diff --git a/R/intex_deal_functions.R b/R/intex_deal_functions.R
index d7288720..29573b24 100644
--- a/R/intex_deal_functions.R
+++ b/R/intex_deal_functions.R
@@ -15,7 +15,10 @@ source(file.path(root.dir, "code", "R", "tranche_functions.R"))
getdealdata <- function(dealnames){
sqlstring <- sprintf("select * from latest_clo_universe where dealname in ('%s')",
paste(dealnames, collapse="','"))
- return( dbGetQuery(dbCon, sqlstring) )
+ data <- dbGetQuery(dbCon, sqlstring)
+ data <- data[match(dealnames, data$dealname),]
+ rownames(data) <- c()
+ return( data )
}
getcollateral <- function(dealname, date=Sys.Date()){