Learn R Programming

SwimmeR (version 0.3.0)

sec_format: Formatting mm:ss.tt times as seconds

Description

Takes a character string (or list) representing time in swimming format (eg 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 (eg 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

mmss_format sec_format is the reverse of mmss_format

Examples

Run this code
# NOT RUN {
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"))

# }

Run the code above in your browser using DataLab