How to make R-GUI as standalone application or executable platform independent software - r

I have made an R-GUI, now i want to make it as an application which can be used as software without running code in 'R' platform, means an executable file which can be run on every windows platform like any other image processing software or any other software like ERDAS or itself R...is it possible to make with in itself R

You cannot make an executable in the sense that people no longer need to install R. What you can do is have a look at Rscript. This enables you to create R programs, e.g. your GUI, that can be run using a shortcut. Note that this still requires your users to install R, and add the location of the R set of executables (R, Rscript, etc, all in $R_HOME/bin) to their $PATH environment variable.
See also this SO post.

Related

Downloading R on Linux for multiple clients

I've created a program that runs in R that I plan on distributing among a lot of other people. Currently the R script is ran completely automatically and behind the scenes with one .sh script which is exactly how it is intended to be. I'm trying to make it so theres no need for client intervention. The R script itself loads the packages and installs them if they aren't present which takes away the task of them installing the packages themselves.
Is there a way I can provide a folder within my Application's folder that they already download that contains R-script and its dependencies so the code can use that location of Rscript to compile and run the R-program I have created. The goal is to be able to download it and run without the need of internet connection to download R and maybe even the programs required packages if possible.
Any help or ideas is appreciated.
I assume that process you want called "creating binary package". Binary is programs (like EXE files) which can run directly on target CPU without any interpreter software (like Python interpreter for python scripts, or Java VM for java applications). I'm not so familiar with packaging of R programs but I found some materials regarding this issue:
1 - Building binary package R
2 - https://seandavi.github.io/post/build-linux-r-binary-packages/
3 - https://support.rstudio.com/hc/en-us/articles/200486508-Building-Testing-and-Distributing-Packages
Second link assumes Linux as target system. Opposite to interpreted languages, binary files often OS dependent (Linux, Windows, or Mac). I, personally, don't know how compatible are packages between Linux systems with different library sets.
Please comment if you find some information misleading, I'll correct the answer.

Can people without R installed run an R Notebook file successfully?

I have an R Notebook that I am building to provide an analysis for somebody, and I am wondering if I should choose another option as I don't know if she will be able to run the Notebook without having R installed.
Is it possible to run an R Notebook as a single entity or must you have R installed in order to do it?
To rerun the notebook they require R. But the whole point of R Notebooks is that they produce a static document as output. That document (usually in HTML format) can be shared in isolation, and does not require any additional software besides a web browser to be viewerd.
Notebook will need R to run. To distribute a notebook without the R dependency will be a bit more elaborate, like installing rstudio server within a docker container. User will, in this particular case, need to have Docker installed and know how to start a container. From there on the user can interact with the code through a web browser.
Another option would be to use the cloud solution that some companies offer. It offers sharing functionality and you don't have to worry about the infrastructure or distribution of your work. There are some free plans that may work for you, but the real power is in premium features.

Setting up RStudio Portable Default R version

I recently discovered a portable version of R and RStudio #
http://rportable.sourceforge.net/
Open source rocks!
At any-rate, I am jumping from pc to pc at my university, and I'd like to get Portable R-studio to recognize Portable R as the default R version. Most computers at the university already have several versions of r-installed, and RStudio uses one of those versions of R. When I go into the Global Options to change the default version, it does not "see" portable R on the USB drive.
I am basically hopping I can run R without constantly having to download packages, specifying the work directory, downloading Scripts, data from Google Drive, etc...
Any suggestions? I am open. Thanks for your help.
I did not need to touch the registry.
I first installed R portable and then R Studio portable, both from Sourceforge.
After launching R Studio for the first time, I was shown the option of choosing the installation of R to be used, as shown in
https://support.rstudio.com/hc/en-us/articles/200486138-Using-Different-Versions-of-R
I browsed to branch \PortableApps\R-Portable\App\R-Portable\bin, where executables are located. There I selected the 64-bit version.
If you want to change later the version used, you open R Studio and go to Tools -> Option -> General -> R Version.
This avoids modifying the registry, with the two advantages of Portable Apps:
Leaving no trace of the app in the system (or, at least, a much milder one).
Being really portable (or, at least, much more so).
On Windows, RStudio uses the system registry to find where installed versions of R are located. You'll need to edit the registry yourself to let it know about new versions. Fortunately you can do this in HKEY_CURRENT_USER so admin rights shouldn't be required. Here are the keys and values you'll want to write:
http://cran.r-project.org/bin/windows/base/rw-FAQ.html#Does-R-use-the-Registry_003f
More detail about how RStudio selects the R version to run here:
https://support.rstudio.com/hc/en-us/articles/200486138-Using-Different-Versions-of-R
The link to R Portable above is a bit misleading. In order to run a portable version of R AND RStudio, you also need the 27MB portable RStudio here. What's even more confusing is that it has the same name as the RPortable file.
It took me a bit of time to figure that one out. Perhaps you could edit your question to point to both for those who wish for an IDE?
And, IMHO, it's not truly portable, because when you move from one machine to another you need to specify the R version on your USB drive and also the work directory. Pity.
I manage to link RStudio (not portable version) to the aforementioned version of R Portable, directly through Global Options -> R Version -> Choose a specific version of R -> Browse,
and the trick was selecting the R-Portable\App\R-Portable folder. Choosing another one doesnt allow RStudio to find the instalation.
Im running RStudio 1.1.463.
Bye!

Deploy R script in a portable usb form

I have an R script which I want to deploy so that it's idiot-proof, one click runs it etc. Unfortunately I don't have the means to pay for a server, and the environment in which it needs to run does not allow the installation of new software, only portable style apps can be run. (School computers) My script also relies on several non-base packages.
Is there any way to deploy R and my script in an easy to run way so it can be used off a usb stick?
You can install R on a USB drive and use it on any computer running the same OS. If you're using Windows, see question 2.6 of the R for Windows FAQ.
If you made the USB stick a bootable disk environment (say linux) with R installed on it, you could boot off it and do it that way.

Interfacing R with other non-Java languages / Compiling R to executable

I've developed a .R script that works with a DB, does a bunch of processing and outputs graphs and tables. I can output that data as comma-separated values and pictures, to later import them on my software, that I have no issue.
The problem is how can I distribute my application without having to make a complete install of R on the client. I've seen things like RJava, but my app is on VB6 (yeah...) and I don't see any libraries, or ways to compile to exe. The compile package only makes compiled versions of any function you define, like what psyco used to do for Python (before Pypy).
Does anyone have some insight on compiling R to avoid having the user to install an entire additional software?
EDIT: Does an R compiler exist? This question relates deeply to mine, but I haven't seen how it can be used to make a full script an exe. You can just compile a main function and cat it to a file? Is that even possible?
The short answer is "no, that will not work".
There simply is no compiler that allows you to shrink-wrap your app. So your best best may be either
using the headless Rserve over the network, or
using the R (D)COM server used by RExcel et al

Resources