# Load simulation output
sim_output_path <- system.file(
"extdata", "rdm_minimal", "simulation",
package = "eam"
)
sim_output <- load_simulation_output(sim_output_path)
# Define a summary pipeline
summary_pipe <- summarise_by(
.by = c("condition_idx"),
rt_mean = mean(rt),
rt_quantiles = quantile(rt, probs = c(0.1, 0.5, 0.9))
)
# Apply function to each condition
sim_sumstat <- map_by_condition(
sim_output,
.progress = FALSE,
.parallel = FALSE,
function(cond_df) {
summary_pipe(cond_df)
}
)
Run the code above in your browser using DataLab