Learn R Programming

JumpeR (version 0.3.0)

math_format: Formatting mm:ss.th times as seconds

Description

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

Usage

math_format(x)

Arguments

x

A character vector of time(s) in track format (e.g. 1:35.93, as minutes:seconds.tenths hundreths) to be converted to seconds (95.93)

Value

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

Examples

Run this code
# NOT RUN {
math_format("1:35.93")
math_format("16:45.19")
math_format("25.43")
math_format(c("1:35.93", "16:45.19", NA, "25.43"))

# }

Run the code above in your browser using DataLab