Is it possible to connect r shiny into my web system



Hi there,

this will be an architecture question rather than a code question.
I have an already running web application. it's a maven app with Java as it background process on server side.
while on the client side it's using html and javascript.

what I'd like to do is to use R Shiny on one of my already running system page to display a reactive graph.
for now my image is to have R Shiny run on different dns than my system. and then on my HTML page I'll use div or iframe to call the R Shiny page.

my question is: are those method can be done?or is there some another way to use R Shiny on a different platform system?


iframe is definitely the classical way of including a Shiny application into another page. You can see this in a few different places on the website.

The other option you might explore, depending on the level of reactivity you need, is htmlwidgets. HTMLWidgets can be rendered using R, Plumber, R Markdown, or Shiny, but have entirely client-side interactivity. Some examples are at:

There is no server side component because all display and interactivity is taken care of with HTML and JavaScript. This means that these objects do tend to be a bit larger, though. If you want to include a HTML Widget into a different application, you can use an iframe much like a Shiny app, but you can also use something like a plumber API to deliver the HTML and JavaScript payload for the widget over a REST-based endpoint. This allows R to generate the HTML / JavaScript, but still display the widget in a different application without an R interpreter and without an iframe.


hi cole,

thank you for your reply, for now I used iframe to linked my shiny app with another application and it worked perfectly!
might try the htmlwidgets that you said in the future.
but for now my question has been answered.

thank you!