View source: R/calculate_pace.R
calculate_speed | R Documentation |
Functions for calculating speed in m s-1 and pace in min km-1.
calculate_speed(seconds, metres)
calculate_pace(seconds, metres, round = NA)
seconds |
Numeric vector of time in seconds. |
metres |
Numeric vector of metres covered within the time period
in |
round |
For |
Numeric vector of speed in m s-1 or pace in min km-1.
Stuart K. Grange
decimal_minute_to_string
# Calculate some speeds
calculate_speed(9.58, 100)
ms_to_km_h(calculate_speed(9.58, 100))
# Calculate pace of a run, the input takes seconds and metres
# Use seconds for time
calculate_pace(5400, half_marathon() * 1000)
# Or the hms data type
calculate_pace(parse_time("01:30:00"), half_marathon() * 1000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.