Pass dataframes from RStudio Server Pro IDE session to RStudio Connect session

Hello,

I'm using RStudio Server Pro and I have published a shiny app on RStudio connect. The Shiny app can access the same files as I can in the RStudio Server Pro. I'd like to open this app by using a RStudio Addin. But the app will run on a separate session.
Is there a way to pass the dataframes from the environment in the session where the shiny app was opened to the shiny app's session on the RStudio connect?

Hello @meelis.perli!

There isn't a direct way to pass data frames to a running shiny app, but the are some alternatives that you might consider:

  1. You could save the data frame as an rds file and have the app read it in from somewhere on disk. This article has more information on this.
  2. You could write a pin from RStudio Server and save that on to Connect and then have the Shiny app read the data from there
  3. You could use a database and write data into it from RSP and read it out again from RSC.
  4. You could write a plumber API that could consume a data frame serialised as JSON and do something with it from there. The Plumber API could (depending on you license) be hosted on RSC.

There are probably more options besides these, but hopefully some of this information will help steer you in the right direction.

Good luck with it!

Thank you!

The first solution worked well.

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.