[R] Column names in Zoo object

From: Shubha Vishwanath Karanth <shubhak_at_ambaresearch.com>
Date: Wed 10 Jan 2007 - 13:58:53 GMT


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
"%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]]

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu Jan 11 01:11:40 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 10 Jan 2007 - 14:30:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.