Package: SwimmeR 0.14.2

SwimmeR: Data Import, Cleaning, and Conversions for Swimming Results

The goal of the 'SwimmeR' package is to provide means of acquiring, and then analyzing, data from swimming (and diving) competitions. To that end 'SwimmeR' allows results to be read in from .html sources, like 'Hy-Tek' real time results pages, '.pdf' files, 'ISL' results, 'Omega' results, and (on a development basis) '.hy3' files. Once read in, 'SwimmeR' can convert swimming times (performances) between the computationally useful format of seconds reported to the '100ths' place (e.g. 95.37), and the conventional reporting format (1:35.37) used in the swimming community. 'SwimmeR' can also score meets in a variety of formats with user defined point values, convert times between courses ('LCM', 'SCM', 'SCY') and draw single elimination brackets, as well as providing a suite of tools for working cleaning swimming data. This is a developmental package, not yet mature.

Authors:Greg Pilgrim [aut, cre], Caitlin Baldwin [ctb]

SwimmeR_0.14.2.tar.gz
SwimmeR_0.14.2.zip(r-4.5)SwimmeR_0.14.2.zip(r-4.4)SwimmeR_0.14.2.zip(r-4.3)
SwimmeR_0.14.2.tgz(r-4.4-any)SwimmeR_0.14.2.tgz(r-4.3-any)
SwimmeR_0.14.2.tar.gz(r-4.5-noble)SwimmeR_0.14.2.tar.gz(r-4.4-noble)
SwimmeR_0.14.2.tgz(r-4.4-emscripten)SwimmeR_0.14.2.tgz(r-4.3-emscripten)
SwimmeR.pdf |SwimmeR.html
SwimmeR/json (API)
NEWS

# Install 'SwimmeR' in R:
install.packages('SwimmeR', repos = c('https://gpilgrim2670.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/gpilgrim2670/swimmer/issues

Datasets:

On CRAN:

4.53 score 4 stars 17 scripts 402 downloads 29 exports 43 dependencies

Last updated 2 years agofrom:99771b92d5. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 09 2024
R-4.5-winOKNov 09 2024
R-4.5-linuxOKNov 09 2024
R-4.4-winOKNov 09 2024
R-4.4-macOKNov 09 2024
R-4.3-winOKNov 09 2024
R-4.3-macOKNov 09 2024

Exports:%!in%%>%%notin%age_formatclean_eventscorrect_split_distancecorrect_split_lengthcourse_convertcourse_convert_dfdiscard_errorsdive_placedraw_bracketformat_resultsget_modemake_lineupmmss_formatname_reorderplaceread_resultsRead_Resultsresults_scoresec_formatsplits_to_cumulativesplits_to_lapswim_parseswim_parse_ISLSwim_Parse_ISLswim_placeundo_interleave

Dependencies:askpassbitbit64clicliprcpp11crayoncurldplyrfansigenericsgluehmshttrjsonlitelifecyclemagrittrmimeopensslpdftoolspillarpkgconfigprettyunitsprogresspurrrqpdfR6Rcppreadrrlangrvestselectrstringistringrsystibbletidyselecttzdbutf8vctrsvroomwithrxml2

SwimmeR

Rendered fromSwimmeR.Rmdusingknitr::rmarkdownon Nov 09 2024.

Last update: 2021-11-18
Started: 2020-04-09

Readme and manuals

Help Manual

Help pageTopics
"Not in" function%!in% %notin%
Add dummy entry rowsadd_event_dummy_row
Add row numbers to raw resultsadd_row_numbers
Formatting yyy-mm ages as yearsage_format
Helper function for formatting yyy-mm ages as years, enables vectorization of 'age_format'age_format_helper
Regularizes event namesclean_events
Combined paired sets of columns following a join operationcoalesce_many
Combined paired sets of columns following a join operationcoalesce_many_helper
Collects relay swimmers as a data frame within 'swim_parse'collect_relay_swimmers
Collects relay swimmers as a data frame within 'swim_parse_old'collect_relay_swimmers_old
Collects relay swimmers as a data frame within 'swim_parse_omega'collect_relay_swimmers_omega
Collects relay swimmers as a data frame within 'swim_parse_splash'collect_relay_swimmers_splash
Changes lengths associated with splits to new valuescorrect_split_distance correct_split_length
Changes lengths associated with splits to new valuescorrect_split_distance_helper
Swimming Course Convertercourse_convert
Course converter, returns data frame - defunctcourse_convert_DF course_convert_df
Swimming Course Convertor Helpercourse_convert_helper
Discards elements of list that have an error value from 'purrr::safely'.discard_errors
Adds places to diving resultsdive_place
Creates a bracket for tournaments involving 5 to 64 teams, single eliminationdraw_bracket
Pulls out event labels from textevent_parse
Pulls out event labels from textevent_parse_ISL
Fills NA values with previous non-NA valuefill_down
Shifts non-NA values to left in data framefill_left
Fold a vector onto itselffold
Formats data for analysis within 'swim_parse'format_results
Create a one-line data frame containing an entry to be appended to an in-progress data frame of all entriesgenerate_row_to_add
Find the mode (most commonly occurring) element of a listget_mode
Pulls out heat labels from textheat_parse_omega
Parses Hy-Tek .hy3 fileshy3_parse
Helper for reading prelims and finals places from Hy-Tek .hy3 fileshy3_places
Helper for reading prelims and finals times from Hy-Tek .hy3 fileshy3_times
Cleans input stringshytek_clean_strings
Sort data in DQ lists of length 3 within 'hytek_swim_parse'hytek_length_3_DQ_sort
Sort data in lists of length 3 within 'hytek_swim_parse'hytek_length_3_sort
Sort data in DQ lists of length 4 within 'hytek_swim_parse'hytek_length_4_DQ_sort
Sort data in lists of length 4 within 'hytek_swim_parse'hytek_length_4_sort
Sort data in lists of length 5 within 'hytek_swim_parse'hytek_length_5_sort
Sort data in lists of length 6 within 'hytek_swim_parse'hytek_length_6_sort
Sort data in lists of length 7 within 'hytek_swim_parse'hytek_length_7_sort
Sort data in lists of length 8 within 'hytek_swim_parse'hytek_length_8_sort
Sort data in lists of length 9 within 'hytek_swim_parse'hytek_length_9_sort
Helper for reading interleaving prelims and finals resultsinterleave_results
Determines if a link is validis_link_broken
Results for Lilly King's 200 BreaststrokesKing200Breast
Sorts and collects lines by performance and row numberlines_sort
Breaks out lists of lists by sub-list lengthlist_breaker
Initialize a named list of listslist_to_list_names
Transform list of lists into data framelist_transform
Determine optimal entries against a given opponent lineupmake_lineup
Determine optimal entries against a given opponent lineupmake_lineup_helper
Assign overpowered entriesmake_lineup_helper_2
Formatting seconds as mm:ss.hhmmss_format
Pads shorter lists in a list-of-lists with 'NA's such that all lists are the same lengthna_pad
Orders all names as "Firstname Lastname"name_reorder
Add places to resultsplace
Pulls out reaction times from textreaction_times_parse
Read in html files of swimming resultsread_htm
Read in hy3 files of swimming resultsread_hy3
Read in pdf files of swimming resultsread_pdf
Reads swimming and diving results into a list of strings in preparation for parsing with 'swim_parse'Read_Results read_results
used to indicate that results have been read in with 'read_results' prior to being parsed by 'swim_parse'read_results_flag
Replaces superseded rowsreplacement_entries
Scores a swim meetresults_score
Formatting mm:ss.tt times as secondssec_format
Helper function for formatting mm:ss.hh times as seconds, used to enable vectorized operation of 'sec_format'sec_format_helper
Cleans input stringssplash_clean_strings
Collects Splash format splitssplash_collect_splits
Determines indent length for data within 'swim_parse_splash'splash_determine_indent_length
Sort data in lists of length 10 within 'splash_swim_parse'splash_length_10_sort
Sort data in lists of length 11 within 'splash_swim_parse'splash_length_11_sort
Sort data in lists of length 12 within 'splash_swim_parse'splash_length_12_sort
Sort data in lists of length 4 within 'spash_swim_parse'splash_length_4_sort
Sort data in lists of length 5 within 'spash_swim_parse'splash_length_5_sort
Sort data in lists of length 6 within 'spash_swim_parse'splash_length_6_sort
Sort data in lists of length 7 within 'spash_swim_parse'splash_length_7_sort
Sort data in lists of length 8 within 'spash_swim_parse'splash_length_8_sort
Sort data in lists of length 9 within 'spash_swim_parse'splash_length_9_sort
Collects splits within 'swim_parse'splits_parse
Collects splits within 'swim_parse_ISL'splits_parse_ISL
Collects splits for relays within 'swim_parse_omega'splits_parse_omega_relays
Collects splits within 'swim_parse_splash' for Splash resultssplits_parse_splash
Produces data frames of splits within 'swim_parse_splash' for Splash resultssplits_parse_splash_helper_1
Produces data frames of splits within 'swim_parse_splash' for Splash resultssplits_parse_splash_helper_2
Collects splits for relays within 'swim_parse_splash'splits_parse_splash_relays
Adds together splits and compares to listed finals time to see if they match.splits_reform
Advances split names by one split_lengthsplits_rename_omega
Converts splits from lap to cumulative formatsplits_to_cumulative
Helper function for converting lap splits to cumulative splitssplits_to_cumulative_helper_recalc
Converts splits from cumulative to lap formatsplits_to_lap
Helper function for converting cumulative splits to lap splitssplits_to_lap_helper_recalc
Formats swimming and diving data read with 'read_results' into a data frameSwim_Parse swim_parse
Formats Hytek style swimming and diving data read with 'read_results' into a data frameswim_parse_hytek
Formats swimming results from the International Swim League ('ISL') read with 'read_results' into a data frameSwim_Parse_ISL swim_parse_ISL
Formats swimming and diving data read with 'read_results' into a data frameswim_parse_old
Formats Omega style swimming and diving data read with 'read_results' into a data frameswim_parse_omega
Formats swimming and diving data read with 'read_results' into a dataframeswim_parse_samms
Formats Splash style swimming and diving data read with 'read_results' into a data frameswim_parse_splash
Add places to swimming resultsswim_place
Defunct functions in SwimmeRSwimmeR-defunct
Deprecated functions in SwimmeRSwimmeR-deprecated
Rescore to account for tiestie_rescore
Formats Hytek style swimming and diving Top Times reports read with 'read_results' into a data frametoptimes_parse_hytek
Undoes interleaving of listsundo_interleave
Create a one-line data frame containing an entry to be appended to an in-progress data frame of all entriesupdate_rank_helper