MyNixOS website logo
Description

Convert R Markdown or Quarto Content into Interactive Tutorials.

Helps teachers convert existing '.Rmd' and '.qmd' teaching material into interactive tutorials for 'learnr' or 'quarto-live'. Conversion preserves narrative text, setup chunks, and major chunk options, supports teacher tags, and provides explicit validation and conversion reports. Output conventions follow 'learnr' as described by Aden-Buie et al. (2025) <doi:10.32614/CRAN.package.learnr>, 'quarto-live' as described by Stagg (2024) <https://tidyverse.org/blog/2024/10/quarto-live-0-1-1/>, and R Markdown as described by Xie, Allaire and Grolemund (2018, ISBN:9781138359338).

tutorizeR hex sticker

R-CMD-check Lifecycle: maturing

tutorizeR

tutorizeR is an R package for converting existing R Markdown (.Rmd) and Quarto (.qmd) teaching material into interactive tutorial documents for learnr and quarto-live.

The package is designed for instructors who want to keep one source document while generating student-facing exercises, solution scaffolds, multiple-choice questions, and conversion reports. The core workflow is source-first: revise the lesson source, rerun the conversion, review the generated tutorial, and distribute the result through the course infrastructure already in use.

tutorizeR workflow

Scope

tutorizeR supports the following teaching workflows:

  • Convert .Rmd and .qmd lessons to learnr tutorials.
  • Convert .qmd lessons to quarto-live-oriented resources.
  • Generate exercise and solution blocks from existing R chunks.
  • Add conceptual checks through inline MCQ blocks or reusable YAML/JSON question banks.
  • Lint source lessons before conversion.
  • Write JSON or YAML conversion reports for review and reproducibility.
  • Process a folder of lessons with a consistent conversion policy.
  • Export LMS-oriented manifests for downstream integration.

The package does not replace instructor review. Generated tutorials should be inspected before they are used with students, especially when assessment, feedback, or grading logic is involved.

The repository currently demonstrates package functionality through tests, vignettes, documentation, and an installable example module. It does not currently contain formal classroom outcome data or measured learning-gain evidence.

Installation

Choose the installation source that matches your use case.

# CRAN, once the package is available there
install.packages("tutorizeR")
# Tagged GitHub release
install.packages("remotes")
remotes::install_github("AurelienNicosiaULaval/[email protected]")
# Current development branch used for review work
install.packages("remotes")
remotes::install_github("AurelienNicosiaULaval/tutorizeR@review/jose-readiness")

Quick Start

The installed example module contains a Quarto lesson, a small local dataset, a question bank, and expected outputs. The following example copies the lesson to a temporary directory and converts it to a learnr tutorial.

library(tutorizeR)

example_dir <- system.file(
  "examples",
  "example_course_module",
  package = "tutorizeR"
)

work_dir <- file.path(tempdir(), "tutorizeR-example")
dir.create(work_dir, recursive = TRUE, showWarnings = FALSE)

file.copy(
  from = file.path(example_dir, "lesson-source.qmd"),
  to = work_dir,
  overwrite = TRUE
)
file.copy(
  from = file.path(example_dir, "student_activity.csv"),
  to = work_dir,
  overwrite = TRUE
)

question_bank <- load_question_bank(file.path(example_dir, "question-bank"))

report <- tutorize(
  input = file.path(work_dir, "lesson-source.qmd"),
  output_dir = work_dir,
  format = "learnr",
  assessment = "both",
  question_bank = question_bank,
  mcq_source = "mixed",
  overwrite = TRUE,
  verbose = FALSE
)

print(report)

The returned report records the input file, output file, output format, assessment mode, generated exercises, generated MCQs, lint summary, warnings, and render status when applicable.

Main Functions

TaskFunctions
Convert one lessontutorize(), convert_to_tutorial()
Convert a folderconvert_folder()
Work with question banksload_question_bank(), validate_question_bank()
Check lesson structurelint_source(), validate_input(), validate_output()
Save conversion metadatawrite_tutorize_report()
Export course integration artifactsexport_lms_manifest(), export_tutorial_package()
Use RStudio addinslaunch_tutorizeR_addin(), launch_tutorizeR_folder_addin(), launch_tutorizeR_preview_addin()

Authoring Syntax

Instructor comments inside R chunks control conversion.

# tutorizeR: hints=Group by program before summarising|Use .groups = "drop"
activity |>
  dplyr::group_by(program) |>
  dplyr::summarise(
    mean_hours = mean(study_hours),
    mean_score = mean(quiz_score),
    .groups = "drop"
  )

Supported tags include:

  • skip
  • exercise-only
  • solution-only
  • mcq
  • narrative-only
  • locked
  • hints=Hint 1|Hint 2

Inline MCQs use YAML inside a tutorizeR-mcq fenced block.

question: "Which variable identifies the academic program?"
answers:
  - text: "program"
    correct: true
  - text: "quiz_score"
    correct: false

Reusable question-bank references use YAML inside a tutorizeR-mcq-ref fenced block.

ids: [visualization-aesthetic]
strategy: ordered
shuffle_answers: false

Batch Conversion

library(tutorizeR)

course_dir <- file.path(tempdir(), "course")
question_bank <- load_question_bank(file.path(course_dir, "question-bank"))

folder_report <- convert_folder(
  dir = file.path(course_dir, "lessons"),
  recursive = TRUE,
  output_dir = file.path(course_dir, "tutorials"),
  format = "learnr",
  assessment = "both",
  question_bank = question_bank,
  mcq_source = "mixed",
  lint_strict = TRUE,
  overwrite = TRUE
)

print(folder_report)

Documentation

The package includes vignettes that are also used as pkgdown articles:

The pkgdown site configuration is stored in _pkgdown.yml. The generated site is built into pkgdown/ so it does not overwrite the repository's source documentation in docs/.

pkgdown::build_site()

Quality Control

Recommended local checks for maintainers:

Rscript -e "testthat::test_local('.')"
Rscript -e "lintr::lint_package()"
Rscript -e "urlchecker::url_check()"
Rscript -e "devtools::document()"
R CMD build .
R CMD check --as-cran tutorizeR_0.4.5.tar.gz

Installed example smoke test:

Rscript -e "source(system.file('examples', 'example_course_module', 'run-example.R', package = 'tutorizeR'))"

Known Limitations

  • learnr render checks require learnr to be installed.
  • Generated learnr tutorials activate gradethis setup only when gradethis is installed.
  • quarto-live output requires the Quarto live extension in the teaching project.
  • LMS export is manifest-only in version 0.4 and does not publish directly to a remote LMS API.
  • Question banks are local YAML or JSON files in version 0.4.
  • Formal learning-outcome evaluation is not included in the repository.

Review and Publication Materials

Reviewer-facing JOSE and JOSS preparation materials are maintained in the source repository under docs/ and paper/. These files are intentionally kept separate from the CRAN package contents. Claims about classroom deployment, broad adoption, or learning outcomes should be added only when supported by verifiable repository evidence.

Licensing

The package code is released under the MIT license. The CRAN-style license metadata is stored in LICENSE, and the full MIT license text is available in LICENSE.md.

Educational example materials in inst/examples/, generated expected educational outputs, and graphical documentation assets in man/figures/ are released under CC-BY 4.0 unless otherwise specified. See LICENSE-CONTENT.md and LICENSES.md in the source repository.

Metadata

Version

0.4.5

License

Unknown

Platforms (79)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    wasip1
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasip1
  • wasm64-wasip1
  • x86_64-cygwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows