I have a large data set containing time in hh:mm:ss format and I would like to convert these to a decimal format while ignoring the hours (hh). I have used strptime but this
It's relatively trivial to write a function which does the conversion for you. Assuming your input is character vectors:
> decimateTime=function(time) {
+ time=as.numeric(unlist(strsplit(time, ":")))
+ time = time[1]*60+time[2]+time[3]/60
+ return(time)
+ }
> times=c('00:01:38', '01:18:30', '13:18:01')
> print(sapply(times,decimateTime))
00:01:38 01:18:30 13:18:01
1.633333 78.500000 798.016667