Learn R Programming

pdmod (version 1.0.1)

averageBySession: 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

Examples

Run this code
# NOT RUN {
# 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)
# }

Run the code above in your browser using DataLab