createPageList: Read in Information on What to Display on a Page and Prepare...

Description Usage Arguments Details Value Examples

View source: R/create_page_list.R

Description

Reads in a document with read.table and prepares the input to be in the form needed to later call createPage on it to create and display a html page containing text and or various input format offered by shiny.

Usage

1
2
3
4
5
6
7
8
createPageList(
  defaulttxt = TRUE,
  location = "local",
  fileName = "Example",
  randomize = TRUE,
  globId = fileName,
  droptoken = "droptoken.rds"
)

Arguments

defaulttxt

logical. If TRUE (default) a default option is used.

location

string. The file location. Valid inputs are "local" or "dropbox". Not needed if defaulttxt is TRUE.

fileName

string. The name of the file to read in. If defaulttxt is TRUE this has to be one of the options specified in details. Else it has to be the file name inclusive full path in either dropbox or the local system.

randomize

logical. If TRUE (default) the page variable of the items that have a 1 in the randomize variable should be randomly ordered.

globId

string. Vector containing the names of the page or questionnaire variables.

droptoken

string. The name of the file in which the access tokens for dropbox are stored. If this file is not in the app directory the full path must be specified. Must be an rds file.

Details

Input files must have a very specific form described in detail in the vignettes (for details call ShinyPsych_Guide()) and can be read in from a local place or from dropbox. If dropbox is used you must specify tokens to access it (see drop_read_csv) in an rds file. Available default files are "Demographics", "Goodbye", "Goodbye_BanditFullStudy", "Instructions_Bandit", "Instructions_BanditFullStudy", "Instructions_Bart", "Instructions_CheckId", "Instructions_Dd", "Instructions_Dfd", "Instructions_Dfe", "Instructions_Survey", "Instructions_TagsInput", "REI_Inventory", "Survey_BanditFullStudy", "Survey_Example" and "TagsInput_Example".

Value

A list containing many different parameters necessary to later create the page with createPage. See example for details.

Examples

1
2
3
example.survey <- createPageList(fileName = "Survey_Example", randomize = TRUE)
example.survey
rm(example.survey)

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