[R] Column names in Zoo object/BlpGetata problem

Shubha Vishwanath Karanth shubhak at ambaresearch.com
Wed Jan 10 15:10:36 CET 2007


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 at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Shubha Vishwanath
Karanth
Sent: Wednesday, January 10, 2007 7:29 PM
To: r-help at 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 at 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.



More information about the R-help mailing list