correct_split_distance: Changes lengths associated with splits to new values

View source: R/correcting_splits.R

correct_split_distanceR Documentation

Changes lengths associated with splits to new values

Description

Useful for dealing with meets where some events are split by 50 and others by 25.

Usage

correct_split_distance(df, new_split_length, events)

correct_split_length(df, new_split_length, events)

Arguments

df

a data frame having some split columns (Split_50, Split_100 etc.)

new_split_length

split length to rename split columns based on

events

list of events to correct splits for

Value

a data frame where all events named in the events parameter have their split column labels adjusted to reflect new_split_length

Examples

df <- data.frame(Name = c("Lilly King", "Caeleb Dressel"),
Event = c("Women 100 Meter Breaststroke", "Men 50 Yard Freestyle"),
Split_50 = c("29.80", "8.48"),
Split_100 = c("34.33", "9.15"))

df %>% correct_split_distance(
 new_split_length = 25,
 events = c("Men 50 Yard Freestyle")
)


gpilgrim2670/SwimmeR documentation built on March 26, 2023, 5:05 p.m.