Hi,
I am downloading Bloomberg data from R. This data will be stored in a
zoo object by default. The command is
dat<-blpGetData(con,c("NOK1V FH Equity","AUA AV
Equity"),"PX_OPEN",start=as.chron(as.Date("12/1/2006",
"%m/%d/%Y")),end=as.chron(as.Date("12/28/2006",
"%m/%d/%Y")))
Here I am downloading the data for two tickers, ("NOK1V FH Equity" and
"AUA AV Equity") simultaneously. Then the column names of my zoo
object
will be NOK1V.FH.Equity and AUA.AV.Equity respectively, which are the
ticker names itself.
But if I download for only one ticker by the code,
dat<-blpGetData(con,c("NOK1V FH Equity
"),"PX_OPEN",start=as.chron(as.Date("12/1/2006",
"%m/%d/%Y")),end=as.chron(as.Date("12/28/2006",
"%m/%d/%Y")))
Now, the column name of my zoo object is "PX_OPEN", the field name
instead of the ticker name "NOK1V FH Equity".
I need my second code to work as the first one. i.e., if only one ticker
is used instead of two or more, then the column name taken by my zoo
object should be the ticker name and not the field name. Could somebody
help me on this?
Thanks in advance.
[[alternative HTML version deleted]]