asdf1212
asdf1212

Reputation: 411

How to run a shiny app as a standalone application?

I've some shiny app and I want to execute and to make it standalone application (it will be awesome if it will open via chrome). I can't upload the app to the Net and I want that also co-workers without R studio or R will use this app. because of the security company - I can't download any software except R packages. I saw here a few solution, but all of them included any software download.

Upvotes: 12

Views: 8531

Answers (1)

Jan
Jan

Reputation: 5254

I have done some research on this issue. The commenters are basically correct: you need the R binaries in some way, either a portable R or an R server. But there are solutions that allow it to bundle those with your code and hide the details from your users.

  1. On option is to wrap your app along with a portable R into a container application like Electron. The electron-quick-start project tries this.
  2. The RInno package provides functions to bundle your app and R portable into an installer app. Every user runs the installer on their system once which will install your app, the packages and the code. But in the end users may not see the difference to other apps. They get a link in the start menu and that's it. I did that successfully. But it did not work out of the box. I had to adjust the output manually in several places.
    (NOTE: RInno looks abandoned. Some tickets request the support of newer R versions).
  3. A second container solution works with docker. That is what ShinyProxy does. See also this blog.
  4. The package shinyShortcut (I quote) "will produce an executable file that runs the shiny app directly in the user's default browser".
  5. DesktopDeployR looks very straightforward. It does not depend on any other frameworks than a portable R distribution.

Important to note: I haven't tested most of them. From reviewing the solutions I often get the feeling that these solutions might make releases somewhat complicated because there are always manual steps involved.

Upvotes: 7

Related Questions