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

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -