[R] histogram for time with format hh:mm

Allan Engelhardt allane at cybaea.com
Thu Jun 18 08:25:48 CEST 2009


On 18/06/09 06:38, Shreyasee wrote:
> Hi,
>
> I have a dataset and calculated the time difference between two time
> variables.
> The output is somewhat like *"1/29/2324  1:57:39 AM".*
>    
That is not a time difference you have calculated.

(x<-difftime("2009-12-31 12:00","2009-01-01 08:45"))
# Time difference of 364.1354 days

Change your calculation to be a time difference and you should be fine.  
See help("strftime") if needed.

Always post self-contained code examples.

Allan




More information about the R-help mailing list