averaged_trials {GCalcium} | R Documentation |
'averaged_trials' averages values over each time point, across the specified trials
averaged_trials(Dataframe, Trials)
Dataframe |
a GCalcium-format data frame or matrix |
Trials |
numbers of trials to be averaged across |
a data frame with observation times and averaged values
### 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)