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

Simon Urbanek simon.urbanek at r-project.org
Tue May 9 16:47:08 CEST 2006


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, so you have to use  
get.hist.quote("foo",method="wget")

Cheers,
Simon



More information about the R-sig-finance mailing list