nextBanditPage: Go to Next Page After a Game of the Bandit Task

Description Usage Arguments Value

View source: R/next_bandit_page.R

Description

If a game of the bandit task is finished this function will (if properly set up, this has to be handled in the app) be called if the continue button is pressed.

Usage

1
2
3
4
5
6
7
8
9
nextBanditPage(
  ctrlVals,
  distList,
  gameData,
  withPracticeGame = TRUE,
  afterPracticePage = "postPractice",
  afterGamePage = "endGame",
  afterLastGamePage = "lastEndGame"
)

Arguments

ctrlVals

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

distList

list. The one used to create the outcome lists with createBanditList.

gameData

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

withPracticeGame

logical. If TRUE (default) the page after the first game will be afterPracticePage, else it will be afterGamePage.

afterPracticePage

string. The name of the page to be shown after the practice trial. Only needs to be specified if withPracticeGamble is set to TRUE.

afterGamePage

string. The name of the page to be shown after the trials up to the second to last trial.

afterLastGamePage

string. The name of the page to be shown after the last trial.

Value

An updated version of ctrlVals. Does not have to be assigned, since it is a reactive value.


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