prepare_participant_data: Prepare Participant Data

View source: R/utility.R

prepare_participant_dataR Documentation

Prepare Participant Data

Description

Returns preprocessed data for a specific participant.

Usage

prepare_participant_data(
  data,
  idv = "id",
  dv = "rt",
  iv = "condition",
  preprocessFs,
  preprocessArgs
)

Arguments

data

The data of a specific participant, arranged according to the independent variable ('iv')

idv

The name of the participant identifier column.

dv

The names of the dependent variable(s) to apply the summary function (summary_function) to. For multiple dependent variables use a string list with the names of each dependent variable (e.g., c('dv1','dv2')),

iv

Labels of an independent variable, indicating the different levels under which the dependent variable(s), 'dv', is expected to differ.

preprocessFs

An ordered list of functions to apply to the dataset before starting with the analysis. The function accepts a 'data' argument (a data frame including the data of an individual), and an 'args' argument which includes all additional arguments needed to run the preprcessing function.

preprocessArgs

An ordered list of function arguments, to be used when invoking the 'preprocessFs' (in order, meaning preprocessFs[i](preprocessArgs[i]) will be invoked for each i). For example, if the preprocessing function accepts arguments 'a','b' as inputs, preprocessArgs should be set to list(a,b)

Value

processed participant data, ready to be analyzed


mufcItay/weaknull documentation built on Jan. 29, 2025, 7:28 p.m.