Convert times to hours.
Details
Converts times to hours. To convert times to minutes or seconds, see convertToMinutes or convertToSeconds.
See also
Other times:
convertHoursAMPM()
,
convertToMinutes()
,
convertToSeconds()
Other conversion:
convert.magic()
,
convertHoursAMPM()
,
convertToMinutes()
,
convertToSeconds()
,
percentileToTScore()
,
pom()
Examples
# Prepare Data
df <- data.frame(hours = c(0,1), minutes = c(15,27), seconds = c(30,13),
HHMMSS = c("00:15:30","01:27:13"), HHMM = c("00:15","01:27"))
# Convert to Hours
convertToHours(hours = df$hours, minutes = df$minutes, seconds = df$seconds)
#> [1] 0.2583333 1.4536111
convertToHours(HHMMSS = df$HHMMSS)
#> [1] 0.2583333 1.4536111
convertToHours(HHMM = df$HHMM)
#> [1] 0.25 1.45