Convert times to seconds.
Details
Converts times to seconds. To convert times to hours or minutes, see convertToHours or convertToMinutes.
See also
Other times:
convertHoursAMPM()
,
convertToHours()
,
convertToMinutes()
Other conversion:
convert.magic()
,
convertHoursAMPM()
,
convertToHours()
,
convertToMinutes()
,
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"),
MMSS = c("15:30","87:13"))
# Convert to Minutes
convertToSeconds(hours = df$hours, minutes = df$minutes,
seconds = df$seconds)
#> [1] 930 5233
convertToSeconds(HHMMSS = df$HHMMSS)
#> [1] 930 5233
convertToSeconds(HHMM = df$HHMM)
#> [1] 900 5220
convertToSeconds(MMSS = df$MMSS)
#> [1] 930 5233