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 -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -