Specify function inputs in R
I would like to wrap the code below in a function to avoid repeating it multiple times for different input matrices and timepoints. The function should save in the work environment a reshaped data frame, consisting of one row and multiple columns.