Learn R Programming

qdap (version 1.3.5)

hms2sec: Convert h:m:s to Seconds

Description

Converts a vector of h:m:s to seconds.

Usage

hms2sec(x)

Arguments

x
A vector of times in h:m:s.

Value

  • Returns a vector of times in seconds. Generally, this function is for internal use.

See Also

times, sec2hms

Examples

Run this code
hms2sec(c("02:00:03", "04:03:01"))
hms2sec(sec2hms(c(222, 1234, 55)))

Run the code above in your browser using DataLab