Skip to content

Knitting Learnr from the Terminal #645

Answered by gadenbuie
stefanopagliari asked this question in Q&A
Discussion options

You must be logged in to vote

learnr tutorials are rendered in two steps:

  1. A pre-render step prepares the text of the tutorial and sets up everything that's needed for running the Shiny app that powers the tutorial. This is the output of rmarkdown::render(), which is an HTML intended to be run and served as an interactive application by Shiny.
  2. The app step sets up a Shiny app from the pre-rendered tutorial and serves the interactive app to the user. The command for this step is rmarkdown::run(), which will also trigger a re-render if there isn't a prerendered HTML file or if that file is out of date.

So you can try running

Rscript -e "rmarkdown::run("tutorial.rmd")

to start up the learnr tutorial. This will start up …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@stefanopagliari
Comment options

Answer selected by stefanopagliari
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants