knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
You first need to load up the learnr package, then use run_tutorial()
and select the practical you wish to run:
library(learnr) run_tutorial("practical1-1", package = "RPiR")
From Practical exercise 1-6 onwards, we suggest that you open a separate instance of RStudio to run your code.
Click on the Start Over link (look for the tiny grey text below the left menu).
Close the window, then click on the red STOP button in RStudio to end the process.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.