Calling one shiny app from within my shiny app



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.


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 If you are deploying your application on a server, however, you can use an iframe that points to the other application.


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?


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?


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.


Hi Winston, is there an example that I can check for the shiny server for running different apps?