How do I calculate the median response time across participants for each question (rows are participants and columns are correct answers and response time). I can do it for individual columns but I don't know how to loop through all the columns and put the answers into a new table.
In the end I want a table that shows the average response time and the percentage of correct answer for each question.
I can find the median for each question and also the percentage of correct answers for each question but I can loop through the dataset so collate a summary table of these statistics.
new_Data <- data[ , grepl( "correct|time" , names( data ) ) ]