[R] Problem with get.hist.quote (tseries library)....

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Fri Jun 7 08:42:26 CEST 2002


On 7 Jun 2002, Peter Dalgaard BSA wrote:

> > [2049] "19-Apr-94,13.23,13.30,12.71,13.20,2094000"      "18-Apr-94,13.08,13.39,13.05,13.20,3120000"
> > [...]
> > The last two lines:
> > [2881] "4-Jan-91,27.89,27.95,27.67,27.73,1085100"       "3-Jan-91,27.79,28.16,27.76,27.82,1307400"
> > [2883] "2-Jan-91,27.92,28.13,27.73,27.73,1037700"
>
> Same here.
>
> Could you try debug(get.hist.quote) and see what line causes the
> error? My bet is this one:
>
>         dat <- as.POSIXct(strptime(dat, "%d-%b-%y"), tz = "GMT")
>
> If so, what is in `dat' at that point?

In a German locale I would expect that to work but generate NAs for months
where the English abbreviation is not used in German.  The error would
then come from later use of those NAs.

Now get.hist.quote tries to set the C locale, but there is no
guarantee that setting locales will work, and in particular that the C
locale exists.  My suspicion is that is the case on Windows.  If
(temporarily) you go to Regional settings in the Control Panel and
set an English locale, then try R again, it will probably work.


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list