Shiny as Stand-Alone Program - r

I wrote a Shiny app, and now I need to turn it into a Stand-Alone Program. The reasoning behind this is that I need to share the app but can't do this with shinyapps.io or a server as I need the app to be able to access user's folders.
So far, I found these 2 tutorials: deploying-desktop-apps and packaging-your-shiny-app. Both of them (supposedly) work on Windows, but I have a Mac, and I want to app to be available for users of all systems, or at least Mac and Linux. Any thoughts and suggestions would be appreciated!
I actually tried to follow the tutorial mentioned above, and can't even install R-portable for my Mac. So I'm looking for something different.
Running a Virtual Machine to follow Windows tutorial is an option, but in this case, the app will be Windows-specific, and I don't want this.

This thread is really old I know, but I'm also trying to find answers on creating a standalone version of R for Mac.
This would support for
https://github.com/chasemc/electricShine
which supports Windows

Related

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.
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.
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".
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.

Put RShiny app in docker for Windows based local computers

I have an RShiny based application developed on Windows 10 using R (4.0.4), RStudio and RShiny. I want to share this application with my colleagues (who also use Windows 10) for them to use but they don't have R or RStudio installed. I want them to be able to use this app without installing R and RStudio since we don't have admin rights on our laptops and getting them requires raising tickets. One possible option would be to host the app on a server and use shiny-server, then share the link to the app. But we don't have a server budget currently.
My primary question is, if there is a way to share the app with my colleagues without them having to go through the hassle of installing R and RStudio.
From my preliminary research, I have found that Dockers (or Rockers by RStudio Inc.) can be used to achieve this by making the app into a "docker image" (whatever this means!). But all the articles I found were about dockerising the RShiny app for Linux based systems and servers. Hence, my secondary question is, if anybody knows this Docker/Rocker can be used on Windows based systems to help me in my scenario explained in first paragraph.

Shiny app on Server: not publish it, only make it run

I am working on an Shiny app in R. My goal is to put in on a server, not on my local pc.
EDIT: my goal is not to publish it on the web, but only make it run on the server locally.
I have installed R on the server, added all the libraries I need, lastly I tried to launch my app that it is quite long, the schema is more or less this:
data preprocessing (with RODBC)
some custom functions
server<- etc.
ui<- etc.
shinyapp(server,ui)
Well in my local pc everything is fine, but on the server I cannot have a result, it is impossible to reach the address.
I decided to do something like this, create the two files called server and ui, and launching them with:
runApp(".../shiny")
Having the idea to use the option of runApp.
Well it is arriving this
ERROR: Error sourcing C:\Users\...\AppData\Local\Temp\Rtmp8YeSOV\file22281c0c2f6d
First of all, this procedure is going to help me?
If so, could you tell me what that error mean?
Thanks in advance.
I'm not sure, but I think it's not possible to reach a shiny app running in a local computer (or server). For that purpose you can use the Shiny Sever, which allow you to put your Shiny apps accessible online.
It seems that your server is a Windows computer, so your options are:
Build Shiny Server from its source code, (maybe a little difficult).
Use a virtual machine like VMware Player (free for non-commercial use) and install Ubuntu or other Linux distribution to use the pre-built binary of Shiny Server. With this option you can restrict the access to only your local network and maybe faster access to your DB's.
Use a DigitalOcean virtual server (for a very reasonable price), in this case you apps will be on the cloud and accesible everywhere.
For option 2 and 3 you can follow the very useful and well written tutorial of Dean Attali about installing and setting up a Shiny Sever. It is for DigitalOcean but is pretty much the same if you decide to use a virtual machine with Linux.
The answer is quite simple, I was using IE as browser: if you use Chrome specifying it on the runApp statement, everything works fine.

Building R package for windows on mac

Question:
I am developing an R package. I have not yet submitted to CRAN (and it's not ready to at any rate). I want to send the package to friend for some preliminary testing (he's not a builder) and I just want to see if he can use a few features.
On my Mac version of RStudio, I can generate binaries easily. It creates a file called "iatgen_1.0.tgz"
Can my friend use that to install my early build on his windows machine? Or do I need to do something to that file to make it usable for a windows user. Let's assume I have NO access to a windows machine. What can I do from my mac to make this package usable by windows users?
I am posting my comment as an (extended) answer because I think it will help you. When I built my package, I did not have access to Windows either and was suffering from the same issue. I discovered the the Windows build service offered at http://win-builder.r-project.org/ and it worked great. You'll need to do a few things before you send it in, and this is all explained on the site.
First, build your source package with R CMD build. Next, check the package with R CMD check. If this succeeds, follow the rest of the instructions on the site and if all goes well they will send you a link to the temporary directory on their server where you can download the Windows build. If all does not go well, Mr. Ligges will send you an email with the detailed issues so you can fix them and try again.
Like I said, the service worked very well for me. The response was prompt and there were absolutely no problems.

Finished coding desktop app in Qt. How to deploy and distribute it?

Ok, this is indeed a newbish question but I have to take a first step somewhere.
I've just had experience with DevC++ console applications, which means a simple .exe would be produced from the compiling, running from cmd. That was all, you could send the .exe to a gentleman running the same OS and he could run your little program.
What happens with Qt Creator projects, though? I've finally finished my dekstop application, wrote and debugged everything that needed to be done, I sort of have some nice GUI going, everything's working nice but... How do I acually give it to other people that don't have QtC to run it through?
Any guide that covers this?
Deployment
Here are some guides helping you to deploy your application on different platforms:
X11
Windows
Mac OS X
Embedded Linux
Symbian
Installation
I can highly recommend
NSIS
Inno Setup
Distribution
Have a look at this site. Here you can present your application to others and let them download it.
The subject of your question is simple, but I'm sure it will help many people! Your question is a good contribution.
Well, last thing you do is find out dependencies - shared libraries, and squeeze that all into installer. :)
Resources:
Qt has a nice page called Deploying an Application on Windows, as a part of their documentation. So all the dependencies related stuff is covered there.
List of best free installers is available here.
My suggestion is to invest some time in writing a CMake script and then using CPack for the distribution.
Here is a very simple example
http://www.cmake.org/Wiki/BundleUtilitiesExample
with this you are able to deploy a mac application. Then you can also extend it to create Debian or RPM packages!
The CMake mailing list is always a source of useful suggestion.
In windows you probably have to redistribute the Qt DLL with your program, as well as for Mac you have to include Qt libraries in your bundle.

Resources