I have an Rmarkdown doc with lots of embedded interactive shiny components and equations in TeX.
Works terrific! Convenient to edit the prose with Rmarkdown, and the shiny components can be interleaved freely. (In fact, I have shiny-inside-Rmd-inside-shiny-inside-Rmd, & it works great!)
Just click the "Run Document" button, then in the Preview Window click "Open in Browser".
how can I make it easily available to a user/student?
Goal: to do, in a function call or shell command,
the equivalent of "Run Document" followed by "Open in Browser".
(You need "Open in Browser" because
the layout in viewer is so different that the viewer is useless.)
I tried wrapping the whole thing inside a shiny app wrapper. It "works", but (a) the Rmarkdown table-of-contents navigator doesn't appear and (b) some shiny components (including all plots) in the Rmarkdown doc don't appear and all reactivity is broken.
I tried writing a few lines using rmarkdown::render(runtime='shiny') expecting to use httpuv and browseURL(), but no good. It fails because the shiny output input and session objects are not in scope. Yet via some magic behind "Run Document", they are, and the application runs fine.
Trying to see how httpuv::startServer works, but a little (or a lot) beyond me at this point.
If I could only locate the code behind the "Run Document" button, that would help a lot.