convertToHours {petersenlab} | R Documentation |
Convert Time to Hours.
Description
Convert times to hours.
Usage
convertToHours(hours, minutes, seconds, HHMMSS, HHMM)
Arguments
hours |
Character vector of the number of hours. |
minutes |
Character vector of the number of minutes. |
seconds |
Character vector of the number of seconds. |
HHMMSS |
Times in HH:MM:SS format. |
HHMM |
Character vector of times in HH:MM format. |
Details
Converts times to hours. To convert times to minutes or seconds, see convertToMinutes or convertToSeconds.
Value
Vector of times in hours.
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)
convertToHours(HHMMSS = df$HHMMSS)
convertToHours(HHMM = df$HHMM)
[Package petersenlab version 1.0.0 Index]