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
There is probably a lubridate function for this, but I'd do it like this:
x <- "01:18:30" y <- (as.numeric(as.POSIXct(paste("2014-01-01", x))) - as.numeric(as.POSIXct("2014-01-01 0:0:0")))/60 #[1] 78.5
Ignoring the hours:
y%%60 #[1] 18.5