Sharing your Shiny application with others

Typically, you create a Shiny application not only for yourself, but also for other users. There are a two main ways to distribute your app; either you let users download your application, or you deploy it on the web.

By offering the option to download your final Shiny application, other users can run your app locally. Actually, there are four ways to deliver your app this way. No matter which way you choose, it is important that the user has installed R and the Shiny package on his/her computer.

After showing you the ways users can download your app and run it on their local machines, we will now check the options to deploy Shiny apps to the web.

http://www.shinyapps.io/ is a Shiny app-hosting service by RStudio. There is a free-to-use account package, but it is limited to a maximum of five applications, 25 so-called active hours, and the apps are branded with the RStudio logo. Nevertheless, this service is a great way to publish one's own applications quickly and easily to the web.

To use http://www.shinyapps.io/ with RStudio, a few R packages and some additional operating system software needs to be installed:

Since the shinyapps package is not on CRAN, you need to install it via GitHub by using the devtools package:

When everything that is needed is installed ,you are ready to publish your Shiny apps directly from the RStudio IDE. Just click on the Publish icon, and in the new window you will need to log in to your http://www.shinyapps.io/ account once, if you are using it for the first time. All other times, you can directly create a new Shiny app or update an existing app.

Shinyapps.io

After clicking on Publish, a new tab called Deploy opens in the console pane, showing you the progress of the deployment process. If there is something set incorrectly, you can use the deployment log to find the error.

Shinyapps.io

When the deployment is successful, your app will be publically reachable with its own web address on http://www.shinyapps.io/.

Shinyapps.io