Use Shiny apps as part of an R package

Hi,
I'm developing an R package with a few functions and I've also made a few of the functions into Shiny apps so that users who don't know how to use R can run these functions. I'm interested in the best way to share all of this as one unit. I was planning to share the Shiny apps using a Gist, but it doesn't look like this provides the option to share multiple Shiny apps at once and it's unclear to me how this links up with the actual functions that are stored in the R package that is hosted on github.

From what I've seen so far, I need to create a Gist for each individual Shiny app and then include all of the functions from the R package in each Gist. I'd prefer to have the Shiny apps directly link to the R package on github so that whenever I update the functions, it will automatically be reflected in the Shiny app.

I assume that others have shared similar types of packages and that there is an easy way to do this, but I haven't been able to find a solution.

Thank you,
Mikey

If you can get the users to install packages then you could use the install_github command from the devtools package?

This is an option. So if I do this, then do I need to set up a separate Gist for each of the Shiny apps?

The gist method lets people run your apps without having to download or install anything. You'd probably just use a separate gist for each app.

But if your users will install your package, then I think you can just include your Shiny apps in there and they can just run them easily. Here's a web page that I found that gives some examples.

https://deanattali.com/2015/04/21/r-package-shiny-app/

I'm new with R and Shiny though, so I don't really know what I'm doing :slightly_smiling_face:

1 Like

Thank you @swebs. I think that what Dean does in this blog post might work for my problem.

I was able to get this to work using this blog post as recommended. This is an effective way to share multiple Shiny apps along with your package and make it very easy for users to run the apps while having everything stored in once place (on github in my example).

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