[R] difftime error
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Oct 25 13:14:43 CEST 2010
On Mon, 25 Oct 2010, 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"
Do such times exist in your unstated timezone? The first definitely
does not in the UK timezone (hint DST started at 1am on that day).
What precisely happens when you specify invalid date-times is
system-dependent, and you have not stated yours (pace the posting
guide). But I am surprised you got NA.
> 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
> --
> View this message in context: http://r.789695.n4.nabble.com/difftime-error-tp3010105p3010105.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list