[R] difftime error

Uwe Ligges ligges at statistik.tu-dortmund.de
Mon Oct 25 13:04:01 CEST 2010



On 25.10.2010 12:55, dpender wrote:
>
> R community,
>
> I am trying to create an array of the time differences between datapoints
> for a very large set.  For some reason for 4 of the values the difference
> has been calculated as NA.
>
> Looking at the individual points two of them are "1981-03-29 01:40:00" and
> "1981-03-29 02:00:00"


Note that "1981-03-29 02:00:00"
is exactly the time of a daylight saving time change and needs 
declaration of a time zone.

You may want to force  tz="GMT"  if you think the time difference was 
really 20 minutes (rather than 1:20 or -0:40 or whatever that is).

Best,
Uwe Ligges





>
> This is the exact same format as the other points that return values of 20
> mins as expected.
>
> In such a large dataset (600,000+ entries) I don't know why only 4 would be
> doing this.
>
> Apologies for such a vague question but can anyone shed any light on what
> may be wrong?
>
> Thanks,
>
> Doug



More information about the R-help mailing list