trim_initial_trials: Trim initial trials from ACE/SEA data

View source: R/module-trim.R

trim_initial_trialsR Documentation

Trim initial trials from ACE/SEA data

Description

Applies corresponding ace_trims to every session of data. If subsequent trimming is to be done by reacion time, we recommend calling this function first, and then calling trim_rt_trials_range or trim_rt_trials_sd.

Usage

trim_initial_trials(df, n = 5, exclude = c(), verbose = TRUE)

Arguments

df

a data.frame containing formatted trialwise ACE data.

This includes data loaded with the following methods:

  1. load_ace_file

  2. load_ace_bulk

n

numeric. How many trials to remove from each participant's data? Defaults to 5. When set as an integer, removes the first N trials from each condition. When set as a decimal between 0 and 1, removes the first (N*100) percent of trials from each condition (more trials removed from longer tasks). Either way, this function will remove the first N trials from each condition completed by each participant.

exclude

character vector. Specify the names of modules (proper naming convention!) that should be ignored. Defaults to an empty character vector, so that all modules are scrubbed. Note that this function always excludes spatial span tasks, as those are much shorter than other modules.

verbose

logical. Print details? Defaults to TRUE.

Value

Returns the input data, with the first N trials for each participant removed.

Assumptions

Assumes the data.frame is nested, with two columns: module (character) and data (list, each containing a data.frame).


josegallegos07/aceR documentation built on June 27, 2022, 10:25 a.m.