sec_format: Formatting mm:ss.tt times as seconds

View source: R/sec_format.R

sec_formatR Documentation

Formatting mm:ss.tt times as seconds

Description

Takes a character string (or list) representing time in swimming format (e.g. 1:35.37) and converts it to a numeric value (95.37) or a list of values representing seconds.

Usage

sec_format(x)

Arguments

x

A character vector of time(s) in swimming format (e.g. 1:35.93) to be converted to seconds (95.93)

Value

returns the value of the string x which represents a time in swimming format (mm:ss.hh) and converts it to seconds

See Also

sec_format is the reverse of mmss_format

Examples

sec_format("1:35.93")
sec_format("16:45.19")
sec_format("25.43")
sec_format(c("1:35.93", "16:45.19", "25.43"))
sec_format(c("1:35.93", "16:45.19", NA, "25.43", ":55.23"))


gpilgrim2670/SwimmeR documentation built on March 26, 2023, 5:05 p.m.