appendDdValues: Append Input from Delay Discounting Task to Task Control List

Description Usage Arguments Value

View source: R/append_dd_values.R

Description

After a trial in the delay discouting task is ended the data is appended to the task control list (gameData) which has to be a reactive value (see reactiveValues or https://shiny.rstudio.com/reference/shiny/latest/reactiveValues.html).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
appendDdValues(
  ctrlVals,
  input,
  gameData,
  container,
  withPracticeTrial = TRUE,
  afterPracticePage = "postPractice",
  afterTrialPage = "endGame",
  afterLastTrialPage = "lastEndGame"
)

Arguments

ctrlVals

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

input

The input object from a shiny app.

gameData

list of reactive values. Specifically for the bandit task. Can be created with createTaskCtrlList.

container

list. Containing at least an object named "trial.order". Usually this list is created with createDdList.

withPracticeTrial

logical. If TRUE it is assumed that a practice trial was included. The page after that trial will be afterPracticePage.

afterPracticePage

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

afterTrialPage

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

afterLastTrialPage

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

Value

The changed gameData list of reactive values and change current page value (note: does not have to be assigned when function is called).


ndphillips/ShinyPsych documentation built on Feb. 14, 2022, 5:53 p.m.