[R] Troubles on retrieving rownames

David Winsemius dwinsemius at comcast.net
Wed Mar 17 23:17:04 CET 2010


On Mar 17, 2010, at 3:25 PM, anna wrote:

>
> Hi guys, I am using the blp() function from RBloomberg package which  
> returns
> a matrix of prices with the columns corresponding to the security  
> name and
> the columns to the date. When I have a look at the matrix I can see  
> the
> rownames (dates) on the left of the prices but when I call the  
> rownames()
> function it returns me a NULL value. It worked perfectly until I had  
> to
> reinstall the RBloomberg package. Here is my code:
> (you need to be connected to bloomberg to run it):
> conn <- blpConnect(na.action="na")
> prices <- blp(conn, securirtyNames, "PX_LAST", startDate, endDate)
>> rownames(prices)
> NULL
>
> any idea of what it could be? What I don't understand is that I can  
> see
> those rownames on the console...

Given that there appears to be no function named blp in the Index of  
the current version of RBloomberg,  I am not surprised that you get a  
null return from rownames() on an object created by it.
http://finzi.psych.upenn.edu/R/library/RBloomberg/html/00Index.html

I'm guessing that you need to use blpGetData or blpReadFields or one  
of the other higher level functions. The package maintainers are at R- 
Forge:
http://r-forge.r-project.org/users/ananelson/

>
--

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list