Function formats split data and calculates split distances, split times and average split velocity
format_splits(distance, time)
distance | Numeric vector |
---|---|
time | Numeric vector |
Data frame with the following columns:
Split number
Distance at which split starts
Distance at which split ends
Split distance
Time at which distance starts
Time at which distance ends
Split time
Mean velocity over split distance
data("split_times") john_data <- split_times[split_times$athlete == "John", ] format_splits(john_data$distance, john_data$time)#> split split_distance_start split_distance_stop split_distance #> 1 1 0 5 5 #> 2 2 5 10 5 #> 3 3 10 15 5 #> 4 4 15 20 5 #> 5 5 20 30 10 #> 6 6 30 40 10 #> split_time_start split_time_stop split_time split_mean_velocity #> 1 0 1.201 1.201 4.163197.... #> 2 1.201 1.967 0.766 6.527415.... #> 3 1.967 2.656 0.689 7.256894.... #> 4 2.656 3.314 0.658 7.598784.... #> 5 3.314 4.591 1.277 7.830853.... #> 6 4.591 5.849 1.258 7.949125....