# Data Import, Cleaning, and Conversions for Swimming Results

## Documentation for package ‘SwimmeR’ version 0.14.2

- DESCRIPTION file.
- User guides, package vignettes and other documentation.
- Package NEWS.

## Help Pages

A C D E F G H I K L M N P R S T U misc

## -- A --

add_event_dummy_row | Add dummy entry rows
add_row_numbers | Add row numbers to raw results
age_format | Formatting yyy-mm ages as years
age_format_helper | Helper function for formatting yyy-mm ages as years, enables vectorization of 'age_format'

## -- C --

clean_events | Regularizes event names
coalesce_many | Combined paired sets of columns following a join operation
coalesce_many_helper | Combined paired sets of columns following a join operation
collect_relay_swimmers | Collects relay swimmers as a data frame within 'swim_parse'
collect_relay_swimmers_old | Collects relay swimmers as a data frame within 'swim_parse_old'
collect_relay_swimmers_omega | Collects relay swimmers as a data frame within 'swim_parse_omega'
collect_relay_swimmers_splash | Collects relay swimmers as a data frame within 'swim_parse_splash'
correct_split_distance | Changes lengths associated with splits to new values
correct_split_distance_helper | Changes lengths associated with splits to new values
correct_split_length | Changes lengths associated with splits to new values
course_convert | Swimming Course Converter
course_convert_DF | Course converter, returns data frame - defunct
course_convert_df | Course converter, returns data frame - defunct
course_convert_helper | Swimming Course Convertor Helper

## -- D --

discard_errors | Discards elements of list that have an error value from 'purrr::safely'.
dive_place | Adds places to diving results
draw_bracket | Creates a bracket for tournaments involving 5 to 64 teams, single elimination

## -- E --

event_parse | Pulls out event labels from text
event_parse_ISL | Pulls out event labels from text

## -- F --

fill_down | Fills NA values with previous non-NA value
fill_left | Shifts non-NA values to left in data frame
fold | Fold a vector onto itself
format_results | Formats data for analysis within 'swim_parse'

## -- G --

generate_row_to_add | Create a one-line data frame containing an entry to be appended to an in-progress data frame of all entries
get_mode | Find the mode (most commonly occurring) element of a list

## -- H --

heat_parse_omega | Pulls out heat labels from text
hy3_parse | Parses Hy-Tek .hy3 files
hy3_places | Helper for reading prelims and finals places from Hy-Tek .hy3 files
hy3_times | Helper for reading prelims and finals times from Hy-Tek .hy3 files
hytek_clean_strings | Cleans input strings
hytek_length_3_DQ_sort | Sort data in DQ lists of length 3 within 'hytek_swim_parse'
hytek_length_3_sort | Sort data in lists of length 3 within 'hytek_swim_parse'
hytek_length_4_DQ_sort | Sort data in DQ lists of length 4 within 'hytek_swim_parse'
hytek_length_4_sort | Sort data in lists of length 4 within 'hytek_swim_parse'
hytek_length_5_sort | Sort data in lists of length 5 within 'hytek_swim_parse'
hytek_length_6_sort | Sort data in lists of length 6 within 'hytek_swim_parse'
hytek_length_7_sort | Sort data in lists of length 7 within 'hytek_swim_parse'
hytek_length_8_sort | Sort data in lists of length 8 within 'hytek_swim_parse'
hytek_length_9_sort | Sort data in lists of length 9 within 'hytek_swim_parse'

## -- I --

interleave_results | Helper for reading interleaving prelims and finals results
is_link_broken | Determines if a link is valid

## -- K --

King200Breast | Results for Lilly King's 200 Breaststrokes

## -- L --

lines_sort | Sorts and collects lines by performance and row number
list_breaker | Breaks out lists of lists by sub-list length
list_to_list_names | Initialize a named list of lists
list_transform | Transform list of lists into data frame

## -- M --

make_lineup | Determine optimal entries against a given opponent lineup
make_lineup_helper | Determine optimal entries against a given opponent lineup
make_lineup_helper_2 | Assign overpowered entries
mmss_format | Formatting seconds as mm:ss.hh

## -- N --

name_reorder | Orders all names as "Firstname Lastname"
na_pad | Pads shorter lists in a list-of-lists with 'NA's such that all lists are the same length

## -- P --

place | Add places to results

## -- R --

reaction_times_parse | Pulls out reaction times from text
read_htm | Read in html files of swimming results
read_hy3 | Read in hy3 files of swimming results
read_pdf | Read in pdf files of swimming results
Read_Results | Reads swimming and diving results into a list of strings in preparation for parsing with 'swim_parse'
read_results | Reads swimming and diving results into a list of strings in preparation for parsing with 'swim_parse'
read_results_flag | used to indicate that results have been read in with 'read_results' prior to being parsed by 'swim_parse'
replacement_entries | Replaces superseded rows
results_score | Scores a swim meet

## -- S --

sec_format | Formatting mm:ss.tt times as seconds
sec_format_helper | Helper function for formatting mm:ss.hh times as seconds, used to enable vectorized operation of 'sec_format'
splash_clean_strings | Cleans input strings
splash_collect_splits | Collects Splash format splits
splash_determine_indent_length | Determines indent length for data within 'swim_parse_splash'
splash_length_10_sort | Sort data in lists of length 10 within 'splash_swim_parse'
splash_length_11_sort | Sort data in lists of length 11 within 'splash_swim_parse'
splash_length_12_sort | Sort data in lists of length 12 within 'splash_swim_parse'
splash_length_4_sort | Sort data in lists of length 4 within 'spash_swim_parse'
splash_length_5_sort | Sort data in lists of length 5 within 'spash_swim_parse'
splash_length_6_sort | Sort data in lists of length 6 within 'spash_swim_parse'
splash_length_7_sort | Sort data in lists of length 7 within 'spash_swim_parse'
splash_length_8_sort | Sort data in lists of length 8 within 'spash_swim_parse'
splash_length_9_sort | Sort data in lists of length 9 within 'spash_swim_parse'
splits_parse | Collects splits within 'swim_parse'
splits_parse_ISL | Collects splits within 'swim_parse_ISL'
splits_parse_omega_relays | Collects splits for relays within 'swim_parse_omega'
splits_parse_splash | Collects splits within 'swim_parse_splash' for Splash results
splits_parse_splash_helper_1 | Produces data frames of splits within 'swim_parse_splash' for Splash results
splits_parse_splash_helper_2 | Produces data frames of splits within 'swim_parse_splash' for Splash results
splits_parse_splash_relays | Collects splits for relays within 'swim_parse_splash'
splits_reform | Adds together splits and compares to listed finals time to see if they match.
splits_rename_omega | Advances split names by one split_length
splits_to_cumulative | Converts splits from lap to cumulative format
splits_to_cumulative_helper_recalc | Helper function for converting lap splits to cumulative splits
splits_to_lap | Converts splits from cumulative to lap format
splits_to_lap_helper_recalc | Helper function for converting cumulative splits to lap splits
SwimmeR-defunct | Defunct functions in SwimmeR
SwimmeR-deprecated | Deprecated functions in SwimmeR
Swim_Parse | Formats swimming and diving data read with 'read_results' into a data frame
swim_parse | Formats swimming and diving data read with 'read_results' into a data frame
swim_parse_hytek | Formats Hytek style swimming and diving data read with 'read_results' into a data frame
Swim_Parse_ISL | Formats swimming results from the International Swim League ('ISL') read with 'read_results' into a data frame
swim_parse_ISL | Formats swimming results from the International Swim League ('ISL') read with 'read_results' into a data frame
swim_parse_old | Formats swimming and diving data read with 'read_results' into a data frame
swim_parse_omega | Formats Omega style swimming and diving data read with 'read_results' into a data frame
swim_parse_samms | Formats swimming and diving data read with 'read_results' into a dataframe
swim_parse_splash | Formats Splash style swimming and diving data read with 'read_results' into a data frame
swim_place | Add places to swimming results

## -- T --

tie_rescore | Rescore to account for ties
toptimes_parse_hytek | Formats Hytek style swimming and diving Top Times reports read with 'read_results' into a data frame

## -- U --

undo_interleave | Undoes interleaving of lists
update_rank_helper | Create a one-line data frame containing an entry to be appended to an in-progress data frame of all entries

## -- misc --

%!in% | "Not in" function
%notin% | "Not in" function