appendBanditValues: Append Input from n Armed Bandit Task to Task Control List

Description Usage Arguments Value

View source: R/append_bandit_values.R

Description

After a game in the bandit task is ended the data will be sent from the browser to the current R session. This functions appends the sent data to 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
appendBanditValues(ctrlVals, distList, input, gameData)

Arguments

ctrlVals

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

distList

list. At least contains the number of trials "nTrials" (usually the one used to create the distributions with createBanditList).

input

The input object from a shiny app.

gameData

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

Value

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


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