Re: [R] Column names in Zoo object/BlpGetata problem

From: Shubha Vishwanath Karanth <shubhak_at_ambaresearch.com>
Date: Wed 10 Jan 2007 - 14:10:36 GMT


I think the problem is in the BlpGetData function than in the zoo object. Because instead of zoo object, the data was put into a data frame, but then also the problem prevails.

-----Original Message-----
From: r-help-bounces@stat.math.ethz.ch
[mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Shubha Vishwanath Karanth
Sent: Wednesday, January 10, 2007 7:29 PM
To: r-help@stat.math.ethz.ch
Subject: [R] Column names in Zoo object

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



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.

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:27:06 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 - 15: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.