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

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -