favourite_result: Create an HTML file with the favourite question answer

Description Usage Arguments Details Value

View source: R/favourite.R

Description

Creates an HTML file with the table of questions that were chosen as favourites, ordered by number of votes. Also contains navigation to the previous and next question.

Usage

1
favourite_result(answers = NULL, n = NULL, quiz = getOption("peRson.quiz"))

Arguments

answers

Data frame with the answers. Must contain one column for each participant named with their name and favourite answer in the last row (see [demo_answers]). If NULL, it is read from the summary answer sheet created by [quiz_setup()].

n

Number of questions in the quiz (excluding the favourite questions question).

quiz

Quiz environment with quiz variables (uses answers (length), questions (n, person, text)).

Details

As the results of the favourite question are processed in this function, it also saves favourite_result table to the quiz environment.

Value

Writes quiz/Qn+2.html file. Assigns favourite_results to quiz environment.


martina-starc/peRson documentation built on April 14, 2021, 3:48 p.m.