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.
Asked
Active
Viewed 3,845 times
10
-
R is (mostly) an interpreted language. Then you can do a batch file to run your script https://stackoverflow.com/questions/6788928/how-to-run-a-r-language-r-file-using-batch-file . But you need the R binaries to run a R script. You can however put them (with the packages needed for shiny too) on your local network if you want, and call the local address within your batch file – Arnaud Feldmann Oct 10 '21 at 13:10
-
There is, right now, no (simple) way to compile R into autonomous executables https://stackoverflow.com/questions/14096520/compile-r-script-into-standalone-exe-file/28214075 – Arnaud Feldmann Oct 10 '21 at 13:21
-
3Unfortunately, you are probably going to have to work with your IT department. If you can convince them to give you an RShiny server, that would be ideal. You can run the (free) community edition on a pretty lightweight Linux box and it isn't particularly hard to set up. You would just need some server space (presumably carving off a VM from some existing) and then you would be able to host Shiny apps within the firewall. It would not be a huge expense. Otherwise, you may be out of luck. Or just have your company install R and RStudio for these other coworkers and give them a script to launch. – Oct 10 '21 at 14:07
1 Answers
7
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.
- 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.
- 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). - A second container solution works with docker. That is what ShinyProxy does. See also this blog.
- The package shinyShortcut (I quote) "will produce an executable file that runs the shiny app directly in the user's default browser".
- 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.

Jan
- 4,974
- 3
- 26
- 43
-
1Great work at compiling this list. However, RInno seems to be orphaned: https://github.com/ficonsulting/RInno/blob/master/DESCRIPTION – Tripartio May 06 '23 at 20:56
-
1Similarly Desktop Deploy R also helps in creating standalone application https://github.com/wleepang/DesktopDeployR – Golem Aug 01 '23 at 15:56
-