loadData {MacBehaviour}R Documentation

Step2: Load and format data

Description

Prepares the stimuli data for the experiment.

Usage

loadData(
  runList,
  itemList,
  conditionList,
  promptList,
  header = TRUE,
  eventList = NULL
)

Arguments

runList

A numeric vector of data representing the 'Run' column in the experiment.

itemList

A numeric vector of data representing the 'Item' column in the experiment.

conditionList

A numeric/character vector of data representing the 'Condition' column in the experiment.

promptList

A character vector of the main prompt (usually experiment items).

header

A logical value indicating if the output data.frame should include column headers (default is TRUE).

eventList

A numeric vector of data representing the 'Event' column in the experiment.

Value

A data frame with the processed columns 'Run', 'Event', 'Item', 'Condition', and 'Prompt', ready for use in experiments.

Examples


df <- data.frame(
Run = c(1,2),
Item = c(1,2),
Condition = c(1,2),
TargetPrompt = c("1","2"),
Event = c(1,1)
)
ExperimentItem=loadData(df$Run,df$Item,df$Event,df$Condition,promptList = df$TargetPrompt)


[Package MacBehaviour version 1.2.4 Index]