twoOptDfePage: Create an HTML Page to Display and Play a Decisions From...

Description Usage Arguments Details Value Functions

View source: R/n_opt_dfe_page.R

Description

Create an html page and send information to javascript if an option is clicked. Needs prepared lists of outcomes created by createDfeList or of the same structure and control variables created with createCtrlList.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
twoOptDfePage(
  ctrlValsList,
  gambleTitle = "Gamble",
  gambleTitlePractice = "Practice Gamble",
  withPracticeGamble = TRUE,
  displayTitle = TRUE,
  nGambles = 10,
  buttonLabel = "Make Decision"
)

threeOptDfePage(
  ctrlValsList,
  gambleTitle = "Gamble",
  gambleTitlePractice = "Practice Gamble",
  withPracticeGamble = TRUE,
  displayTitle = TRUE,
  nGambles = 10,
  buttonLabel = "Make Decision"
)

fourOptDfePage(
  ctrlValsList,
  gambleTitle = "Gamble",
  gambleTitlePractice = "Practice Gamble",
  withPracticeGamble = TRUE,
  displayTitle = TRUE,
  nGambles = 10,
  buttonLabel = "Make Decision"
)

fiveOptDfePage(
  ctrlValsList,
  gambleTitle = "Gamble",
  gambleTitlePractice = "Practice Gamble",
  withPracticeGamble = TRUE,
  displayTitle = TRUE,
  nGambles = 10,
  buttonLabel = "Make Decision"
)

sixOptDfePage(
  ctrlValsList,
  gambleTitle = "Gamble",
  gambleTitlePractice = "Practice Gamble",
  withPracticeGamble = TRUE,
  displayTitle = TRUE,
  nGambles = 10,
  buttonLabel = "Make Decision"
)

Arguments

ctrlValsList

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

gambleTitle

string. Is displayed as title of the trial, e.g. if it is set to "Gamble" the displayed title in game 2 of 10 will be "Gamble 2 of 10".

gambleTitlePractice

string. Is displayed as title of the practice gamble.

withPracticeGamble

logical. If TRUE (default) a practice gamble must be provided and is played. Only needed if displayTitle is TRUE.

displayTitle

logical. If TRUE (default) a title is displayed.

nGambles

integer. The number of gambles played WITHOUT the practice game.

buttonLabel

string. Is displayed in the continue button. Default is set to "Make Decision".

Details

These functions are called from within multiOptsDfePage because this also handles the appropriate custom message with.

Value

An html page that can be displayed by a shiny appl

Functions


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