r - Rblpapi BDH: How to output a single frame using security as a column? -
i use following codes historical information 2 stocks bloomberg.
library(rblpapi) opt <- c("periodicityselection"="monthly") out1 <- bdh(securities = c("1 hk equity", "2 hk equity"), fields = "tot_return_index_gross_dvds", start.date = as.date("2015-01-01"), end.date = "", options = opt, overrides = null) out1 write.csv(out1, "c://r data//test.csv")
resulting csv file looks this:
is there way output file looks this?
Comments
Post a Comment