rmd2qmd: migrating legacy R Markdown to Quarto

rstats
quarto
Published

July 26, 2026

I have been spending more time moving older analysis projects, notes, and reports from R Markdown to Quarto. That work is usually straightforward until you hit the edge cases: YAML options that matter, chunk behavior that needs to stay intact, or formatting that falls apart when the conversion is handled with simple find-and-replace scripts.

To make that migration less brittle, I put together rmd2qmd, an R package for converting legacy .Rmd documents to .qmd while preserving rendering behavior, executable code, and document structure.

rmd2qmd hex logo

The package is built around a few simple principles:

Under the hood, rmd2qmd works with YAML front matter, the Markdown abstract syntax tree, and knitr chunks so the output is closer to idiomatic Quarto than what you usually get from a quick text substitution.

Right now the package supports a few common workflows:

If you want to try it, install the development version from GitHub:

# install.packages("pak")
pak::pak("chrischizinski/rmd2qmd")

Then convert a file or an entire project:

library(rmd2qmd)

# Convert one file
convert_file("chapter1.Rmd")

# Convert a directory and validate the outputs
results <- convert_directory("book/", validate = TRUE)

# Write a conversion summary
generate_report(results, output = "conversion-report.md")

The package is still early, but the main goal is already in place: make it easier to modernize older R Markdown material without introducing silent changes.

The source code is on GitHub at chrischizinski/rmd2qmd, and the reference site is available at chrischizinski.com/rmd2qmd.