brad-cannell / r4epi

Repository for the R for Epidemiology book
http://www.r4epi.com/
Other
22 stars 52 forks source link

Add executable embedded R code chunks throughout the chapters #88

Open mbcann01 opened 1 year ago

mbcann01 commented 1 year ago

Overview

I want to embed interactive coding practice blocks and quiz questions in the chapters.

Best solution for embedding R coding exercises into a book down book: https://rstudio.github.io/learnr/. It doesn’t look like you can currently add interactive quiz questions directly into bookdown books. I think the best you can currently do is build a learnr app with shiny, post it to shinyapps.io, and then add links to shinyapps.io into your bookdown book. Alternatively, you could create an R4Epi package that includes data, interactive tutorials, and automatically downloads freqtables and meantables as dependencies. Eventually, this may be the sort of thing you want to charge for.

See if Quarto changes this.

2023-01-23: Brian Law suggested I try WebR. He just warns that it is "very beta" right now.