averageBySession {pdmod}R Documentation

Average by session

Description

Calculates the average estimate per session or block of trials

Usage

  averageBySession(estimate, sessionBoundaries)

Arguments

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)

Value

Vector of average estimate for each session

Author(s)

Chloe Bracis

Examples

# 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)

[Package pdmod version 1.0.1 Index]