calculate_pace_splits: Function to calculate splits for a running or cycling event.

View source: R/calculate_pace_splits.R

calculate_pace_splitsR Documentation

Function to calculate splits for a running or cycling event.

Description

Function to calculate splits for a running or cycling event.

Usage

calculate_pace_splits(distance, time, interval = 1, round = 2)

Arguments

distance

Target distance in kilometres.

time

Target time to cover distance as a string. Use a format like "01:30:00" for one hour and thirty minutes.

interval

Interval to calculate splits for in kilometres. Default is 1.

round

Decimal points to round numeric variables to.

Value

Tibble.

Author(s)

Stuart K. Grange

Examples


# Pace for a half marathon
# Every km
calculate_pace_splits(half_marathon(), "01:30:00", 1)

# Every 5 km
calculate_pace_splits(half_marathon(), "01:30:00", 5)


# Pace for 10 km 
calculate_pace_splits(10, "30:00")

# Pace for 5 km 
calculate_pace_splits(5, "18:15")



skgrange/threadr documentation built on April 15, 2024, 9:35 p.m.