read_results
into a
dataframeTakes the output of read_results
of S.A.M.M.S. results and cleans it,
yielding a dataframe of swimming (and diving) results
swim_parse_samms(
file_samms,
avoid_samms = avoid,
typo_samms = typo,
replacement_samms = replacement,
format_samms = format_results
)
returns a data frame with columns Name
, Place
,
Age
, Team
, Prelims
, Finals
,
Event
& DQ
. Note all swims will have a Finals
,
even if that time was actually swam in the prelims (i.e. a swimmer did not
qualify for finals). This is so that final results for an event can be
generated from just one column.
output from read_results
of S.A.M.M.S. style results
a list of strings. Rows in file
containing these
strings will not be included. For example "Pool:", often used to label pool
records, could be passed to avoid
. The default is
avoid_default
, which contains many strings similar to "Pool:", such
as "STATE:" and "Qual:". Users can supply their own lists to avoid
.
a list of strings that are typos in the original results.
swim_parse
is particularly sensitive to accidental double spaces, so
"Central High School", with two spaces between "Central" and "High" is a
problem, which can be fixed. Pass "Central High School" to typo
.
Unexpected commas as also an issue, for example "Texas, University of"
should be fixed using typo
and replacement
a list of fixes for the strings in typo
.
Here one could pass "Central High School" (one space between "Central" and
"High") and "Texas" to replacement
fix the issues described in
typo
should the data be formatted for analysis (special
strings like "DQ"
replaced with NA
, Finals
as
definitive column)? Default is TRUE
swim_parse
must be run on the output of
read_results