trim_rt_trials_range: Trim trials from ACE/SEA data by response time within a fixed...

View source: R/module-trim.R

trim_rt_trials_rangeR Documentation

Trim trials from ACE/SEA data by response time within a fixed range

Description

Applies corresponding ace_trims to every session of data.

Usage

trim_rt_trials_range(
  df,
  cutoff_min = NA,
  cutoff_max = NA,
  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

cutoff_min

numeric. Remove within-subject RTs below (but not equal to) this specified value (in ms)? Defaults to NA, where no too-low values will be scrubbed. Note that load_ace_bulk already removes RTs below 150 ms for all modules, so those can never be included even if this minimum cutoff is set to a value below 150 ms.

cutoff_max

numeric vector. Remove within-subject RTs above (but not equal to) this specified value? Defaults to NA, where no too-high values will be scrubbed. Defaults to FALSE.

exclude

character vector. Specify the names of modules (proper naming convention!) that should be ignored. Defaults to c(), where all modules are subject to range scrubbing. 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 RTs corresponding to offending trials rendered as NA.

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.