Exporting and Importing Lists

I’m working on a shiny application where I need to download a list of one model equation, some plots and some data, and be able to import it later in another application for reuse. I have tried to use RDS and RDATA formats for it, but it hasn’t worked till now, can someone suggest a way to do the same?

Hi,

This other application is also an R-app? Because RDS and RDATA only work in other ones. Normally if you save it correctly, you should just be able to import it without issues from one R script into another. Here is a guide:

If you want to import data into an app other than R, you should save the data in a more commonly supported format like JSON, CSV, ... For lists JSON is a good choice. If you still get stuck, try posting a reprex here for more details. A reprex consists of the minimal code and data needed to recreate the issue/question you're having. You can find instructions how to build and share one here:

Hope this helps,
PJ

This topic was automatically closed 54 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.

Have you tried using RDS or RData in a conventional R script without involving shiny ?
Its good to be familiar and comfortable with things before introducing them to more complicated shiny apps I find.

HI,

Why don't you make us a reprex so we can have a better idea of the issue.

Issues with Shiny code can stem from both the reactive Shiny code itself or the regular R code used in the functions. In order for us to help you with your question, please provide us a minimal reproducible example (Reprex) where you provide a minimal (dummy) dataset and code that can recreate the issue. One we have that, we can go from there. For help on creating a Reprex, see this guide:

Hi!
Thank you for your reply.
The app I am using is also a shiny app but whatever I am downloading, I am not being able to show it. I have already used the RDS and RDATA formats but I am not being able to use the data from the string for further analysis.