I would like to create an html document with RMarkdown, containing text, Rcode and somewhere in between a shiny application.
asis=TRUE
for the shinyApp(ui, server)
block, but RStudio only renders the Rmd file, if I add runtime: shiny
to the YAML-Header.How to generate html-code from the shinyApp function? Or: How to generate an html file, from RMarkdown containing a shiny app instead of e.g. a plot
I hope you have some idea for me.
I don't really understand what you mean by "a shiny application". If you have already set up a server side application, i.e. others can assess your application via url, you can try the following approach.
see https://bookdown.org/yihui/bookdown/web-pages-and-shiny-apps.html, second paragraph
A related function is
knitr::include_app()
, which is very similar toinclude_url()
, and it was designed for embedding Shiny apps via their URLs in the output.
If I understand your question correctly then maybe the following URL could be of help for you:
https://bookdown.org/yihui/rmarkdown/shiny-start.html
As you can see: You don't have to follow the Shiny skeleton template. The only thing to do: You have to add the line runtime: shiny
into the YAML-header and publish the .Rmd
file in the normal way, e.g. you have to include a standard r code snippet in your RMarkdown document where you can write your shiny code.
I hope this is helpful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With