averageBySession {pdmod} | R Documentation |
Calculates the average estimate per session or block of trials
averageBySession(estimate, sessionBoundaries)
estimate |
Series of estimates in event time |
sessionBoundaries |
Vector of the starting indices for each session (which means to include the end, the last value should be length(estimate) + 1) |
Vector of average estimate for each session
Chloe Bracis
# Create vector of values (i.e. estimates, respones, etc.)
values = runif(100)
# Specify sessions, here a group of 10 trials
sessionBoundaries = seq(1, 101, 10)
valuesBySession = averageBySession(values, sessionBoundaries)