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

Simon Urbanek simon.urbanek at r-project.org
Tue May 9 15:37:09 CEST 2006


On May 9, 2006, at 6:20 AM, Dirk Eddelbuettel wrote:

>
> Hi Ajay,
>
> On 9 May 2006 at 14:41, 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=.csv 
> '
> |
> |  *** 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.

Cheers,
Simon



More information about the R-sig-finance mailing list