[R] difftime producing NA values in R 2.12.2

Adrienne Wootten amwootte at ncsu.edu
Tue Oct 25 21:16:17 CEST 2011


Ben,

Thanks! That really helped.  Turns out all the data being used was in
EST and currently the system timezone is EDT.  Thanks for the tip!

A

On Tue, Oct 25, 2011 at 2:27 PM, Ben Bolker <bbolker at gmail.com> wrote:
> 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 ...
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Adrienne Wootten
Graduate Research Assistant
State Climate Office of North Carolina
Department of Marine, Earth and Atmospheric Sciences
North Carolina State University



More information about the R-help mailing list