[R] what happende to as.POSIC.ct ???

Prof Brian D Ripley ripley at stats.ox.ac.uk
Tue May 15 12:33:22 CEST 2001


On Tue, 15 May 2001, BXC (Bendix Carstensen) wrote:

> In my 1021-version I get:
>
> > version
>          _
> platform i386-pc-mingw32
> arch     x86
> os       Win32
> system   x86, Win32
> status
> major    1
> minor    2.1
> year     2001
> month    01
> day      15
> language R
> > as.POSIXct( "1970/01/01" )
> [1] "1970-01-01 Rom"
> >
>
>
> But having upgraded to 1023 I get:
> > version
>          _
> platform i386-pc-mingw32
> arch     x86
> os       Win32
> system   x86, Win32
> status
> major    1
> minor    2.3
> year     2001
> month    04
> day      26
> language R
> > as.POSIXct( "1970/01/01" )
> Error in fromchar(x) : character string is not in a standard unambiguous
> format
>
> Apparently the error comes out of as.POSIXlt which is called by as.POSIXct,
> and it looks as if the behaviour of strptime has changed. But I cannot
> find any differences in the code.
>
> Any clues??

No changes to the code, and it works well on my machine.  There have been
changes to the timezone handling on Windows, and your Windows system may
not be working correctly (not at all unknown).

Hint: Don't use that date to test things: Windows can get confused by it.

That's not the recommended way to do this: use ISOdate.

-- 
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