evaluate_answers: Evaluate the correctness of question answers

Description Usage Arguments Value

View source: R/process_answers.R

Description

Evaluate the correctness of question answers

Usage

1
2
3
4
5
6
evaluate_answers(
  answers = NULL,
  n = NULL,
  correct_answer = NULL,
  quiz = getOption("peRson.quiz")
)

Arguments

answers

A data frame with the answers (see [demo_answers] for format). If NULL, answers are read from the quiz summary sheet (summary_sheet_id) created by [quiz_setup()].

n

Sequence number of the question to evaluate. If NULL, the next question based on the length of saved answers in the quiz environment is evaluated.

correct_answer

Correct answer to the question. If NULL, the answer of the person who asked the question is taken as the correct answer.

quiz

Quiz environment with quiz variables (uses summary_sheet_id, answers, questions).

Value

Evaluated answers are saved to the quiz environment answers list. A plot with results is saved to "quiz/An.png".


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