Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Steps to use pre-existing reactive dataset as a default dataset in Radiant #110

Open
sebastiz opened this issue Jun 30, 2019 · 1 comment

Comments

@sebastiz
Copy link

Hi

Great app. Incredibly useful. I have one question. I have a shiny app that I would like to use some of the Radiant functions in. I have a dataset (which is reactive) already in the shiny app and I would like this to be loaded as the default instead of the diamonds dataset. Is there a simple way to do this? I guess I would have to do something like input$dataset<-RV$data where RV$data is the default dataset I want. But where would I put this code?

Thanks in advance

@vnijs
Copy link
Contributor

vnijs commented Oct 2, 2019

To use an alternative set of .rda files with data.frames as the default you can setup an option (e.g., in .Rprofile

options(radiant.init.data = list.files(path = "data/", full.names = TRUE))

Note that "data/" here points to inst/app/data in the radiant directory but can be any (full) path on a server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants