createTaskCtrlList: Create a List of Reactive Values for Task Control

Description Usage Arguments Value Examples

View source: R/create_task_ctrl_list.R

Description

Create a list of reactive values ((see reactiveValues or https://shiny.rstudio.com/reference/shiny/latest/reactiveValues.html)) for task control. Additional variables can be specified.

Usage

1
createTaskCtrlList(task, oVar = NULL, oVarVals = NULL)

Arguments

task

string. The task name. Has to be a single string since for different tasks some variables are the same. If you have several tasks in the same app just call this function several times. Valid inputs are "bandit", "bart", "dfe", "dfd" and "dd".

oVar

string. Vector with the name(s) of additional variables that should be added to ctrlList.

oVarVals

sting or numeric. Vector containing the values that should be appended to the oVars variables. Must be the same length as oVars.

Value

A list of reactive values used for task control.

Examples

1
2
3
GameData <- createTaskCtrlList(task = "dfd")
print(shiny::isolate(shiny::reactiveValuesToList(GameData)))
rm(GameData)

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