Skip to content

Instantly share code, notes, and snippets.

@seandavi
Created October 10, 2024 03:49
Show Gist options
  • Save seandavi/be9ecc11274e60ca59566f81394fb37e to your computer and use it in GitHub Desktop.
Save seandavi/be9ecc11274e60ca59566f81394fb37e to your computer and use it in GitHub Desktop.
embed webr/pyodide in quarto with quarto-live and live-html extension

prelim

To use the live-html (webr/pyodide) in quarto:

quarto add r-wasm/quarto-live

Template for use

---
title: A Quarto Live Document
engine: knitr
format: 
  live-html:
    theme: darkly
bibliography: ../../talks/references.bib
---

{{< include ../../_extensions/r-wasm/live/_knitr.qmd >}}

```{webr}
fit = lm(mpg ~ am, data = mtcars)
summary(fit)
plot(fit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment