rquiz: Interactive quizzes as HTML widgets for Quarto, R Markdown, and Shiny

I'd like to share a package I recently published on CRAN: rquiz provides interactive quizzes as HTML widgets, designed for embedding knowledge checks in teaching materials.

The problem it solves: I teach Data Science courses using HTML-based lecture slides (Quarto RevealJS) and wanted a lightweight way to add interactive quizzes โ€” without requiring a Shiny server or external services. Existing options either need a server (learnr), offer limited interactivity (webexercises), or are tied to the R/exams ecosystem (exams2forms).

What rquiz offers:

  • Three quiz types: single question, multi-page quiz (with timer and navigation), and fill-in-the-blank cloze exercises
  • Works in R Markdown, Quarto (HTML, Slidy, RevealJS), and Shiny
  • Instant visual feedback, customizable theming via rquizTheme()
  • Multilingual UI (EN/DE/FR/ES so far), answer shuffling
  • ARIA accessibility and keyboard navigation
  • Pure Vanilla JS โ€” no jQuery, no external dependencies, no server

Getting started:

install.packages("rquiz")
library(rquiz)

singleQuestion(
  question = "What does the `%>%` operator do?",
  options = c("Pipe", "Modulo", "Assignment", "Comparison"),
  answer = 1
)

This may also be relevant for anyone looking for alternatives to webexercises (related discussion).

I've been using and refining these widgets with students since 2020. Would
love to hear from other educators โ€” feedback and feature ideas welcome!

1 Like