Re: [R] Difference between two datetimes

2014-01-28 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of David Fox > Sent: Tuesday, January 28, 2014 5:15 PM > To: r-help@r-project.org > Subject: [R] Difference between two datetimes > > I have a data frame

[R] Difference between two datetimes

2014-01-28 Thread David Fox
I have a data frame with variable "datetime" which is of class POSIXct. Consecutive observations are separated by 30 minutes. However, some of the differences reported by R give unexpected results. For example consider the following two consecutive entries: > par.dat$datetime[5944] [1] "2010-04-04