createDdList: Create a List of Prepared Values to Display Later in a Delay...

Description Usage Arguments Value Examples

View source: R/create_dd_list.R

Description

Create a list of tables that are then later displayed. The values, i.e. outcome and time etc. must be specified and given as input. For each outcome time pair a still incomplete html table is created to later be completed and displayed by ddPage (It's incomplete because some parameters need to be specified later on).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
createDdList(
  loadFile = TRUE,
  fileName = "DDExample",
  ddList = NULL,
  sepFile = "\t",
  defaultList = FALSE,
  randomizeVertical = TRUE,
  practiceTrial = NULL,
  withPracticeTrial = FALSE,
  practiceFileName = NULL,
  outcomeCurrency = ""
)

Arguments

loadFile

logical. If TRUE (default) the list specifying the outcome time pairs will be loaded from a local file.

fileName

string. Either a name if a default list is used (currently available is "DDExample") or a full directory to the file that should be read in.

ddList

data.frame. The data frame specifying the outcome time pairs needed to create the tables. Is not used when loadFile is set to TRUE.

sepFile

string. The separator in the to be loaded file. Is passed to sep in read.table.

defaultList

logical. If TRUE (default is FALSE) a default list from the package is be used.

randomizeVertical

logical. If TRUE (default) the order of the trials (i.e. the rows) is randimized.

practiceTrial

data.frame. Of the same structure as ddList containing one practice trial. Only has to be specified if withPracticeTrial is set to TRUE and practiceFileName is NULL.

withPracticeTrial

logical. If TRUE (default is FALSE) a practice trial has to be provided and is included.

practiceFileName

strin. Either a name if a default list is used (currently available is "DDExample") or a full directory to the file that should be read in.

outcomeCurrency

string. The currency that should be displayed after the outcome values (e.g. "$"). If not specified only the numbers will be displayed.

Value

A list containing the prepared html tables of the outcomes, the data frame from the input file or list, the trial order and the number of trials.

Examples

1
2
3
  ddContainer <- createDdList(defaultList = TRUE, fileName = "DDExample",
                              withPracticeTrial = TRUE, outcomeCurrency = "$")
  ddContainer

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