Shiny as an executable

1,325 views
Skip to first unread message

Harold Doran

unread,
Feb 18, 2016, 8:00:05 PM2/18/16
to Shiny - Web Framework for R
I have a shiny app that we are using in my organization. The app has many R functions that are sourced in, html files, .css templates, etc, data sets, example files, and so on so this has become a large app.

My goal is to easily share the files needed to others so they can use them. I am doing this now by zipping the files, and users extract the program on their own computer and run the program.

This works, but has many limits. For example, we are in the initial phases and still working out bugs, so I am constantly emailing new updates and so on.

I have read all of the ways to share shiny and have used github and other web hosting services before to set up my app for users who do not have R and only use the app via the web.

I have no interest in building an R package. As a package maintainer now, the pain of building R packages is more than what I want to do for this current work.

Ideally, I would love for there to be a way to runUrl() on my .zip where I can save my zip file on a network drive that my coworkers have access to. I do not think this works based on the shiny help documentation, but am asking to see if anything has changed and does allow for this.

Also, wondering if any thought has been giving to make a shiny program a self contained executable such that users can simply launch the program from a desktop icon or something. I did this with python many years ago, it required that the user had python installed on their machine, but the program ran on top of that seamlessly. 

Thank you

Dean Attali

unread,
Feb 18, 2016, 10:47:49 PM2/18/16
to Shiny - Web Framework for R
There is a shiny::runUrl() function. I just looked at the documentation for it and it's exactly what you want, it says " The Shiny application must be saved in a .zip, .tar, or .tar.gz file. "
There's also shiny::runGitHub() if you want to host your app on github and anyone can run it from there.
For running it as a standalone, I saw this article last year, I've never tried it myself so I can't comment on how well it works, but you can take a look http://oddhypothesis.blogspot.ca/2014/04/deploying-self-contained-r-apps-to.html

Joe Cheng

unread,
Feb 18, 2016, 10:51:46 PM2/18/16
to Dean Attali, Shiny - Web Framework for R
If runUrl doesn't work on a network drive, can you just put the app there without zipping it, and have your users call shiny::runApp("path-to-network-drive")?
--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/4895aec8-6711-4229-b518-c66c5c348e16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jessica Wojciechowski

unread,
Feb 18, 2016, 11:33:31 PM2/18/16
to Shiny - Web Framework for R
Hi Harold,

You might find this link useful in response to the last question in your post.  This method will also not require the user to have R installed on their machine.


Harold Doran

unread,
Feb 19, 2016, 8:40:39 AM2/19/16
to Shiny - Web Framework for R
Hi Dean:

But the help says the .zip file must be at a downloadable URL. In my case, I want to run this from a network drive to make it accessible to coworkers. So, suppose have a shiny program in a zip called foo.zip and this is saved in the following directory:

c:\mypath\myapp

When I try runUrl("c:\\mypath\\myapp\\foo.zip")

Get the following error

Downloading c:\mypath\myapp\foo.zip
Error in utils::download.file(url, ...) : unsupported URL scheme

I suspect this is because runURL can't pull from a network or even a local drive? Is that right or am I missing something?

Harold Doran

unread,
Feb 19, 2016, 8:44:37 AM2/19/16
to Shiny - Web Framework for R, daat...@gmail.com
Yes, this does indeed work. But, there are certain behaviors I am trying to discourage and so hoping not to do this. For example, when I did this before, my uses were only grabbing some of the files, dragging them over to their local machine, and running the app.

But, I've created an app that now has grown and depends on virtually every file in every subdirectory. So, when they were grabbing only certain files, they were not running the new, updated version.

So, I was thinking if they just ran it from the .zip, it would guarantee that they were running the complete and updated version.

Of course, I could always ask my users to unzip the new .zip onto their local machines, but I'm trying to minimize the steps necessary to run this locally,.

Because my program uses confidential data, I unfortunately cannot set this up as a webapp running on shinyio for now
Reply all
Reply to author
Forward
0 new messages