[R] difftime producing NA values in R 2.12.2

Ben Bolker bbolker at gmail.com
Tue Oct 25 20:27:37 CEST 2011


Adrienne Wootten <amwootte <at> ncsu.edu> writes:

> 
> R-listers,
> 
> I have noticed several posts on issues with difftime producing NA's
> but they have been for older versions of R.  Here's the issue
> associated with difftime that I am dealing with in R 2.12.2.
> 
> 
> > difftime(strptime("03/11/2007 02:00",format="%m/%d/%Y
%H:%M"),preciptime,units="hours")
> Time difference of NA hours
> 

  I haven't checked, but I strongly suspect that this time
falls during the "leap forward" daylight-savings-time switch
in your current time zone, so that time doesn't actually exist
in your time zone ...



More information about the R-help mailing list