Install the latest official learnr release from CRAN:
install.packages("learnr")
Or you can install the most recent version in-development from GitHub with the remotes package:
# install.packages("remotes") remotes::install_github("rstudio/learnr")
learnr works best with a recent version of RStudio (v1.0.136 or later) which includes tools for easily running and previewing tutorials.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.