`averaged_trials` averages values over each time point, across the specified trials
averaged_trials(Dataframe, Trials)
a GCalcium-format data frame or matrix
numbers of trials to be averaged across
a data frame with observation times and averaged values
# NOT RUN {
### Format data frame
df.new <- format_data(GCaMP)
### Plot the average fluorescence signal across trials 1-5
df.1thru5 <- averaged_trials(df.new, 1:5)
plot(x = df.1thru5$Time, df.1thru5$Values)
# }
Run the code above in your browser using DataLab