Calling one shiny app from within my shiny app

shiny

#1

Hello all,

I have one unusual question to ask. It would be so great If I get the solution.

I have made the shiny application and I want to call one other shiny application(Facto shiny already made for PCA) into my existed shiny code.
I have been trying to do that with the source() but I am getting error Can't call runApp() from within runApp(). If your application code contains runApp(), please remove it.
Of course, the other shiny(fact shiny) app has UI.R and server. R of its own.
Has anyone tried this before ?? Is it possible to do so?
Please let me know, this will be very helpful for me.


#2

You can't run one Shiny application within another Shiny application when running the application locally (running from R directly instead of from a hosted platform like Shiny Server, Connect, or shinyapps.io). If you are deploying your application on a server, however, you can use an iframe that points to the other application.


#3

Thanks winston for you response.
However, I am deploying the shiny app in a docker (making a package of shiny app and then after installation of docker , I will put my package into docker)
Well I read about 'Modularizing shiny app code' , In the section of packaging module . Seems like it is possible to do but somehow I am not able to catch how?
Kindly let me know In my case as i am making a package of shiny will it be possible to do so?


#4

As I was thinking will it possible to make a function of this Factoshiny shiny app(which i want within my shiny app) and then call into my shiny app code?


#5

Shiny modules share some similarities with full Shiny applications, but they are not themselves Shiny applications. The previous solution I mentioned -- an iframe in an app -- is the way to go. A hosting platform like Shiny Server is the most straightforward way to do what you want, which is to run multiple Shiny applications simultaneously.