onBartAction: Controls What Happens After a Bart Trial

Description Usage Arguments Value

View source: R/on_bart_action.R

Description

Controls which variables are stored in case of different events such as a saved balloon or a popped balloon.

Usage

1
2
3
4
5
6
7
8
onBartAction(
  id,
  ctrlVals,
  inputList,
  bartCtrlList,
  balloonList,
  nextPageId = NULL
)

Arguments

id

string. Controls what action should be executed (e.g. append values or go to next page). Must be one of "nextballoon", "next_page", "popped" or saveballoon.

ctrlVals

list of reactive values. Controls the flow through the Experiment. Can be created with createCtrlList.

inputList

The input object from the shiny app.

bartCtrlList

list of reactive values. Used for task control. Create with createTaskCtrlList.

balloonList

list. Output of createBartList containing the game parameters.

nextPageId

string. Id of next page that should be displayed. Only needed if id is "next_page".

Value

Updated ctrlVals and bartCtrlList. Doesn't need to be assigned, since both are reactive values.


mdsteiner/ShinyPsych documentation built on Feb. 12, 2022, 2:09 p.m.