[R-sig-finance] Behaviour of get.hist.quote when presented with bad inputs

Achim Zeileis Achim.Zeileis at R-project.org
Tue May 9 16:57:11 CEST 2006


On Tue, 9 May 2006 10:47:08 -0400 Simon Urbanek wrote:

> 
> On May 9, 2006, at 10:34 AM, Ajay Narottam Shah wrote:
> 
> >>> | With R 2.3, when I say get.hist.quote("rubbish") he gets
> >>> extremely unhappy:
> >>> |
> >>> | > library(tseries)
> >>> | Loading required package: quadprog
> >>> | Loading required package: zoo
> >>> | > x <- get.hist.quote("rubbish")
> >>> | trying URL
> >>> | 'http://chart.yahoo.com/table.csv?
> >>> s=rubbish&a=0&b=02&c=1991&d=4&e=08&f=2006&g=d&q=q&y=0&z=rubbish&x=.c 
> >>> sv
> >>> '
> >>> |  *** caught segfault ***
> >>> | address 0x5f4d4550, cause 'memory not mapped'
> >>
> >> This is a (hard to trace) bug in the internal http request code in
> >> R 2.3.0 that strangely enough appears only on OS X. If the URL
> >> doesn't exist, R blows (basically it blows when it wants to print
> >> an error message). You may want to switch to another download
> >> method for now as Dirk suggested, and hopefully we'll fix this
> >> soon.
> >
> > I tried to use options() to set the download method to wget, but  
> > the problem didn't go away.
> >
> 
> get.hist.quote stubbornly refuses to use options,

...because `method = method' is explicitely passed to download.file()
which only triggers getOptions if(missing(method)).

I've just added a workaround to the tseries devel version so that
getOption () is used.
Z



More information about the R-sig-finance mailing list