On Thu, Feb 11, 2010 at 8:40 PM, Jonathan <jonsle...@gmail.com> wrote: > Anybody have an idea why I would get a non-integer value for the > number of days here? > >> difftime('2004-08-05','2001-01-03',units='days') > Time difference of 1309.958 days > > > Would you just round off?
It's one hour short of an integer number of days: > difftime('2004-08-05','2001-01-03',units='hours')/24 Time difference of 1309.958 hours > (1+difftime('2004-08-05','2001-01-03',units='hours'))/24 Time difference of 1310 hours why do you think that might be? here's another hint: a few years ago my birthday only lasted 23 hours. I never got that hour back. Barry -- blog: http://geospaced.blogspot.com/ web: http://www.maths.lancs.ac.uk/~rowlings web: http://www.rowlingson.com/ twitter: http://twitter.com/geospacedman pics: http://www.flickr.com/photos/spacedman ______________________________________________ R-help@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.