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... ----- Anna Lippel -- View this message in context: http://n4.nabble.com/Troubles-on-retrieving-rownames-tp1596990p1596990.html Sent from the R help mailing list archive at Nabble.com.
do 'str(prices)' so we can see the structure of the data. On Wed, Mar 17, 2010 at 2:25 PM, anna <lippelanna24@hotmail.com> 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... > > > ----- > Anna Lippel > -- > View this message in context: > http://n4.nabble.com/Troubles-on-retrieving-rownames-tp1596990p1596990.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve? [[alternative HTML version deleted]]
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
Reasonably Related Threads
- Problem in using bdh function for Govt tickers
- Problem to establish Bloomberg connection / Package RBloomberg / function blpConnect()
- Error in RBloomberg
- failure to connect to Bloomber using Rbbg from batch script on Windows
- Contactos en Madrid-ayuda con instalaciĆ³n