Deploying R shiny app as a standalone application
There is now a way to turn a Shiny app into a standalone Electron app (which is a desktop app, used for apps like Slack). To find out more, see this excellent presentation (YouTube) from useR 2018, which contains further links:
GitHub ColumbusCollaboratory: electron-quick-start
GitHub ColumbusCollaboratory: Photon. RStudio Add-in to build Shiny apps utilizing the Electron framework
@TravisHinkelman's blog "Deploying a Shiny app as a desktop application with Electron"
I'm not sure if it would be a great fit on the code obscurity question, but the RInno package is designed to help with the data security problem, i.e. when a company does not want to share their data with a third party. It also automates the process you referenced above and allows you to connect your app to GitHub/Bitbucket to push out updates to locally installed shiny apps via API calls on startup.
To get started:
install.packages("RInno")
require(RInno)
RInno::install_inno()
Then you just need to call two functions to create an installation framework:
create_app(app_name = "myapp", app_dir = "path/to/myapp")
compile_iss()
If you would like to include R for your co-workers who don't have it installed, add include_R = TRUE
to create_app
:
create_app(app_name = "myapp", app_dir = "path/to/myapp", include_R = TRUE)
It defaults to include shiny, magrittr and jsonlite, so if you are using other packages like ggplot2 or plotly, just add them to the pkgs
argument. You can also include GitHub packages to the remotes
argument:
create_app(
app_name = "myapp",
app_dir = "path/to/myapp"
pkgs = c("shiny", "jsonlite", "magrittr", "plotly", "ggplot2"),
remotes = c("talgalili/installr", "daattali/shinyjs"))
If you are interested in other features, check out FI Labs - RInno. If you'd like a guide on how to connect it to GitHub/Bitbucket check out the Continuous Installation guide :).
You might be interested in DesktopDeployR, a framework for deploying self-contained R-based applications to the desktop.
https://github.com/wleepang/DesktopDeployR