Can I embed shiny app in Rmd within a hosted Rmd html site?

I have a cloud server with hosted RStudio where I do most of my analysis which lately have taken the format of Rmd files with html output.

For my current project I have a linear model and I'd liek for the reader to be able to experiment with various inputs and then view the model outputs.

Over here it says I can use knitr::include_url() to embed a shiny app.

Within my Project directory I have a index.Rmd file and have just created a shiny app by selecting new file > shiny web app from within my hosted Rstudio. I named the new shiny app 'model_inputs' and now there is a new directory in my project directory called 'model_inputs'.

I can select 'run app' from within my browser (Hosted Rstudio) and see the example 'Old Faithful Geyser' app run in a pop out window.

In the console when I run the app I see 'Listening on'

My question is, can I embed this into my html output Rmd?

If so, what URL would I use for embedding the app within knitr::include_url()?

This will include a url as an Iframe. So it could work for a shiny apps if you host the shinyapps somewhere.

In a Rmd, you can also include runtime shiny to have the shinyapps included in the document, but you still need to serve the document from a server with R available.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.