learnr icon indicating copy to clipboard operation
learnr copied to clipboard

Exercise blocks for teaching R Markdown and Shiny

Open garrettgman opened this issue 8 years ago • 4 comments

If possible, I would like to create tutorials that teach students how to use R Markdown. To do this interactively, I would need a second type of interactive exercise block: a block whose content is assumed to be an R Markdown document and whose display comes with a "Knit Document" button.

Is it technically feasible to create such a block? Is it desirable to do so given the complications that R Markdown will introduce to security, grading, and execution?

The obvious follow up would be a third type of exercise block for teaching Shiny: a block whose content is assumed to be an app.R file and whose display comes with a "Run App" button.

garrettgman avatar Feb 21 '17 21:02 garrettgman

I'm very interested in the answer to @garrettgman's second question here as well.

mine-cetinkaya-rundel avatar Feb 22 '17 03:02 mine-cetinkaya-rundel

I think support for both R Markdown and Shiny is possible (Shiny is however bit trickier than R Markdown). One thing to keep in mind is that the form-factor of tutorials imposes some implicit size constraints on output (i.e. tutorial navigation and code both share screen real estate with the output) which makes R Markdown and Shiny a bit more constrained than would be ideal.

jjallaire avatar Feb 22 '17 14:02 jjallaire

I can see this working well for learning:

  • The first lessons in R Markdown and Shiny would be simple and focused, so the constraints will not feel limiting.
  • As the student gains skills, we move them towards the IDE. The exercises can give way to links to shared/forked projects.

garrettgman avatar Feb 22 '17 14:02 garrettgman

I think it would be nifty to have something that allows to write markdown and see result in real time, for ex with https://github.com/showdownjs/showdown

ColinFay avatar Sep 02 '20 08:09 ColinFay