I have a data like this
y<-c("00:00:10", "00:10:10", "2:10:2")
These data are in H:M:S format. I would like to be able to convert this data to total seconds. I like to get H data multiply that with H*60*60 + M*60 + S to calculate the value in total seconds.
I was doing this:
z <- strptime(, "%H")
to get the Hour value, not working. Can anybody chime in?
I have never gotten the hang of handling time in with sophisticated packages. Here’s a oneliner that does it instead.