[R] help regarding storing time difference values in same unit?
suresh.ghalsasi at gmail.com
Thu Feb 5 15:13:16 CET 2009
Thank you, Jholtman ! :-)
> If you are using 'difftime', you can specify the units:
>> x <- as.POSIXct(c('2009-01-01 10:00', '2009-03-04 13:00'))
>  "2009-01-01 10:00:00 GMT" "2009-03-04 13:00:00 GMT"
>> difftime(x, x)
> Time difference of 62.125 days
>> difftime(x, x, units='secs')
> Time difference of 5367600 secs
> On Thu, Feb 5, 2009 at 4:40 AM, Suresh_FSFM <suresh.ghalsasi at gmail.com>
>> Dear R-Experts,
>> Seek your help.
>> In a List object e.g. Time_duration[], I am storing differece between
>> time-stamps (start-time and end-time) for a certain event.
>> Time difference does not remain constant for, say, 10 observations.
>> Each time, the time difference is given in different time units: seconds
>> hours / minutes.
>> Can you please tell me - how I can store the values of time difference in
>> just one time unit ?
>> It can be either seconds, or minutes or hours. The criterion is - unit
>> should be consistent.
>> Thank you in advance.
>> View this message in context:
>> Sent from the R help mailing list archive at Nabble.com.
>> R-help at r-project.org mailing list
>> PLEASE do read the posting guide
>> and provide commented, minimal, self-contained, reproducible code.
> Jim Holtman
> Cincinnati, OH
> +1 513 646 9390
> What is the problem that you are trying to solve?
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
View this message in context: http://www.nabble.com/help-regarding-storing-time-difference-values-in-same-unit--tp21847883p21852134.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help