[R] priceIts problem

Marc Schwartz MSchwartz at MedAnalytics.com
Fri Jul 2 02:26:16 CEST 2004

On Thu, 2004-07-01 at 19:02, Erin Hodgess wrote:
> Dear R People:
> In library(its), there is a command priceIts.
> There is a problem with this command.  It is returning an error message:
> > ibm1 <- priceIts(instrument="ibm",start="1998-01-01",quote="Open")
> Error in download.file(url, destfile, method = method, quiet = quiet) : 
>         cannot open URL `http://chart.yahoo.com/table.csv?s=ibm&a=0&b=01&c=1998&d=5&e=30&f=2004&g=d&q=q&y=0&z=ibm&x=.csv'
> In addition: Warning message: 
> cannot open: HTTP status was `404 Not Found' 
> > 
> This has been working fine until tonight.
> Has anyone else seen this, please?
> thanks in advance!

It would appear that the URL at Yahoo has changed. If you try your URL
in a browser, you get the same 404 msg.

Going to the page for securing an IBM quote:


The URL towards the bottom of the page for the CSV download is:


Note the 'ichart' as opposed to 'chart' in your error msg above. A quick
review of the R source in the 'its' package suggests that the base URL
for Yahoo is hard coded in the priceIts() function and the 'provider'
argument is not yet used.

I have copied Heywood Giles on this reply as an FYI and for

A short term workaround would be to edit the function's code using
fix(priceIts) and change the base URL in the function body as indicated
above. That seems to work for me with a quick check.


Marc Schwartz

More information about the R-help mailing list