Skip to content

vedhav/quarto_webr_examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Using shinylive and webR in a quarto document

Installation and Prerequisites

  • Make sure you have quarto installed.

  • Install the shinylive for both R and python. Note that you have to install the development version of shinylive package for R because in order to use both R and python shinylive they must use the same assets.

# install.packages("pak")
pak::pak("posit-dev/r-shinylive")
pip install shinylive
  • Install the quarto extension for shinylive.
quarto add quarto-ext/shinylive
  • Install the quarto extension for WebAssembly powered code blocks in R and Python.
quarto add r-wasm/quarto-live

Rendering and viewing the content

  • Render the document using the following command:
quarto render

Now the _site directory will contain all the required static files needed to host and view this content. You can start the static server using any method you prefer. Here are a couple of examples:

  • Using Python:
python3 -m http.server 8000 --directory _site
httpuv::runStaticServer(dir = "_site/")

Releases

No releases published

Packages

No packages published

Languages