Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying R shiny app as a standalone application

Tags:

r

shiny

I have developed a RShiny application which I would like to share internally with my colleagues (Hosting the app on a server, is not an option at this stage).

I was exploring various options, and I came across a technique for bundling your app as a standalone desktop application, with an installer file, which you can then share & distribute. (The approach is explained here & here) This is quite neat, because the users installing it need not have R (and any other required packages) to install and run the app (it has portable versions of R, chrome etc)

I was able to follow the approach and create a standalone desktop application, with an installer file, which I can now start sharing.

However, this is my concern: Ideally, I would not want my users to be able to access the source code. Is there a way to restrict such access? In the tutorial (the first link that I posted), this is what the author says:

*

Lastly, keep in mind that your source code is easily accessible. If this is a concern for you (e.g. if you are distributing to a client that should not have access to the code) the best you can do is impede access by first compiling the sensitive source code into a binary package. That said, any user who knows R (and has sufficient intent) can simply dump the code to the console.

*

Are there better, more fool-proof ways to impede access?

Thanks!

like image 968
Dataminer Avatar asked Nov 04 '15 04:11

Dataminer


People also ask

Can you run Shiny app without R?

You can create a standalone shiny app, that runs on computers WITHOUT needing to install R nor any library.

Can you run Shiny app locally?

You might be eager to deploy your Shiny app to a remote server. But the simplest way to run a Shiny app is to run it locally. You only need the shiny R package installed, and you can run the app in your browser.

How do you publish a Shiny app in R?

Publish your Shiny App to RStudio ConnectAt the top of the editor, click Publish. In the Publish to Server window, confirm that your account is shown in the Publish To Account section and click Publish. You can monitor the status of the deployment in the RStudio IDE Deploy pane.


1 Answers

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"

like image 97
p0bs Avatar answered Sep 28 '22 11:09

p0bs