Learn R Programming

dRiftDM (version 0.3.1)

get_avg_trials: Compute average trials per condition across individuals

Description

internal helper — assumes each ID appears with the same set of conditions in column Cond. counts trials per ID×Cond and averages across ID.

Usage

get_avg_trials(obs_data_ids)

Value

list with:

  • N: number of unique individuals

  • avg_trials: named numeric vector of average trials per condition

Arguments

obs_data_ids

data frame with columns ID and Cond; one row per trial.