convert_time {cycleRtools} | R Documentation |
Reformat time.
Description
Functions perform interconversion between "HH:MM:SS" format and seconds.
Usage
convert_from_time(x)
convert_to_time(x)
Arguments
x |
either a character string of the form "HH:MM:SS" ("HH" is optional) or numeric seconds values. |
Value
seconds value(s) for from, and "HH:MM:SS" character string(s) for to.
Examples
x <- c("00:21:05", "25:51", NA, "00:26:01.1", "01:05:02.0")
x <- convert_from_time(x)
print(x)
x <- convert_to_time(x)
print(x)
[Package cycleRtools version 1.1.1 Index]