Skip to content

strptime - Darwin vs Carbon R difference

2 messages · Dr Gregory Jefferis, Jan de Leeuw

#
I am using both the carbon(v1.60) and Darwin (r-base 1.6.1 fink updated
today) versions of R with MacOS X 10.2.  I find that there seems to be a
problem with strptime under Darwin - if a bad date is passed it returns
today's date instead of NA.

Carbon R:
[1] "2001-02-10"
[1] NA


Darwin R:
[1] "2001-02-10"
[1] "2002-11-14"

I presume that this a problem with some external library.  Would anyone be
able to suggest a fix?

Thanks,

Greg.


__________________________________________________________________________
Greg Jefferis,                          Lab Address: Liqun Luo, Herrin 144
Neurosciences PhD Programme &                e-mail: jefferis@stanford.edu
Dept Biological Sciences,                       Lab: (650) 725 5809
Gilbert Biology Building,                       Fax: (650) 723 0589
371 Serra Mall,
Stanford, CA 94305-5020.                       Home: (650) 326 9597
#
See help(strptime)

      If the date string does not specify the date completely, the
      returned answer may be system-specific.  The most common behaviour
      is to assume that unspecified seconds, minutes or hours are zero,
      and a missing year, month or day is the current one.

So both are "not incorrect", but the Darwin response is more common. See
also man strptime on Darwin. There is no reason why the two should be  
the
same.
On Thursday, November 14, 2002, at 09:11 PM, Greg Jefferis wrote:

            
===
Jan de Leeuw; Professor and Chair, UCLA Department of Statistics;
Editor: Journal of Multivariate Analysis, Journal of Statistical  
Software
US mail: 9432 Boelter Hall, Box 951554, Los Angeles, CA 90095-1554
phone (310)-825-9550;  fax (310)-206-5658;  email: deleeuw@stat.ucla.edu
homepage: http://gifi.stat.ucla.edu
   
------------------------------------------------------------------------ 
-------------------------
           No matter where you go, there you are. --- Buckaroo Banzai
                    http://gifi.stat.ucla.edu/sounds/nomatter.au
   
------------------------------------------------------------------------ 
-------------------------