I have a number of excel files (.xlsx) that store athlete VO2max testing data that I want to analyse as a group. Each file represents 1 client and I can get all the files into a list in R with the following code:
files <- list.files(path = "C:/Users/.../vo2 tests", pattern = "*.xlsx", full.names = T)
I then want to be able to find the maximum value from a specific column of a specific sheet in the excel files (this is the clients VO2max). So far the following code works to find the value I need but only returns a result for 1 of the files, however I want the function to run and collect from each of the excel files and output into a new data frame:
tbl <- lapply(files, read_excel, sheet = "Averages", skip = 2)
max(tbl[[1]][["ml/Kg/min"]])
Once I have all of the VO2max values into a new data frame I want to take the average & standard deviation of this new data set for reporting. The aim being I can provide my clients with a constantly updating ranking system of their performance compared to other athletes. Any help here would be much appreciated.