Reads a test recorded with the web form of recording_sheet() (an .xlsx with the sheets stages, recovery and
test), or a CSV in the columns of the template, and returns what lactate_threshold() and test_report() need.
Needs the readxl package for an .xlsx.
Value
a list with
stages: one row per stage, the resting sample first, withintensity,lactate,heart_rateandrpe(andclock_timeandnotesfrom the form). When the form has a "time in the last stage" shorter than the stage duration, the intensity of the last stage is time-weighted, aslactate_threshold(last_stage_duration = )does, and a message says so. A last step that is already smaller than the one before is taken as weighted and kept;recovery: the recovery samples (time, in minutes, andlactate) for the Stegmann threshold, orNULL;athlete:name,date,sex,ageandbody_mass, as recorded, fortest_report(athlete = )orreport_header();sport,sample,rpe_scale,stage_duration(min),siteandgrade(%), forlactate_threshold():"cycling","blood"and"6-20"when not recorded, andNULLfor the others;protocol: the protocol in one line, fortest_report(protocol = ), orNULL;details: every field of the form, as text.
See also
recording_sheet() for the form.
Examples
## a test recorded with the CSV template
file <- tempfile(fileext = ".csv")
write.csv(demo_data[c("intensity", "lactate", "heart_rate", "rpe")], file, row.names = FALSE)
test <- read_recording(file)
results <- lactate_threshold(
test$stages, intensity, lactate, heart_rate, rpe_column = rpe, plot = FALSE
)
