[R] years from as.POSIXlt

Thomas Petzoldt thpe at hhbio.wasser.tu-dresden.de
Wed Mar 10 00:04:30 CET 2004


Prof Brian Ripley wrote:

> See ?julian, which says 
> 
> Note:
> 
>      Other components such as the day of the month or the year are very
>      easy to computes: just use 'as.POSIXlt' and extract the relevant
>      component.
> 

Hello,

unfortunately not all mentioned functions work on all machines. Where

 > months(.leap.seconds)

works on all systems, a call to

 > julian(leap.seconds)

workes perfectly only on Linux (R 1.8.0) but failed on two different XP 
Machines (German XP version):

Error in fromchar(x) : character string is not in a standard unambiguous 
format

I've tested several things, several versions of msvcrt.dll, different 
PATH settings, locale set to German or USA, R 1.8.1 and R 1.7.1, but the 
  problem remains.

On the other hand

 >as.numeric(format(x, f="%d"))

works perfectly, so I do not understand what is wrong with julian()



Thomas P.




More information about the R-help mailing list