Description Usage Arguments Value
Everything the quiz needs to work is assigned to variables in the quiz environment. Quiz functions access these variables through the quiz environment that can be passed as an argument or set as a global option 'peRson.quiz'.
1 2 3 4 5 6 7 | quiz_setup(
questions,
participants,
presence = NULL,
shuffle = TRUE,
create_sheets = TRUE
)
|
questions |
A data frame with questions (see [demo_questions] for format). |
participants |
A data frame with participants (see [demo_participants] for format). |
presence |
Vector of present participants' names. If NULL, all participants from participants data frame (participants$name) will be deemed present. |
shuffle |
If TRUE, the order of answers and questions is randomly shuffled by [shuffle_answers()] and [shuffle_questions()] respectively. |
create_sheets |
If TRUE, a Google Sheet for answers is created for and shared with each participant, plus one summary sheet containing imported answer sheets (though the sheets need to be linked manually in the sheet before answers can be read from it). |
A quiz environment with the following variables.
vector or present participants' names
path to css file used to style the HTML quiz files
data frame with all the provided questions from the questions data frame (shuffled if shuffle is TRUE)
data frame with questions that will be used in the quiz (only those whose askers are present)
data frame with participants from the participants data frame (with added variables chose_color, dist, present and answer_sheet if create_sheets is TRUE)
if create_sheets is TRUE character id of the created summary sheet
vector of hex colors chosen by participants, named with their names, plus average color of chosen colors with "avg" name
vector of hex colors for each question in questions based on the person who asked it
empty list that will be filled with answers by [evaluate_answers()]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.