[R] Deploying code as exe

Mike Marchywka marchywka at hotmail.com
Fri Nov 12 12:50:35 CET 2010









----------------------------------------
> Date: Fri, 12 Nov 2010 11:42:01 +0100
> From: rhelp at eoos.dds.nl
> To: r-help at r-project.org
> Subject: Re: [R] Deploying code as exe
>
>
> On 11/12/2010 09:23 AM, Santosh Srinivas wrote:
> > Dear Group,
> >
> > Is there some way for me to package a few lines of R-code as exe and have it
> > running in the background? (unable to find info in the archives)
> >


I think there is an R developer's list if you are willing to go to some
effort but I don't think there is a "-compile" option to have R compile
your source into a free standing app. If you just call library code,
presumably you could build that using the srouce you download from CRAN
into a non-R related app of your own but that of course would take a
bit of work. 

Alternatively, I'm not sure that "installing R" needs to be more than
copying some files which you could include in a zip file that you 
distribute to yout team etc( the zip file could be quite large if it
contains an R install but that may not be an issue for you). 
If they have cygwin or something more
sophisticated than DOS windoze for bat files  you can write an install
script and this may even be possible with bat files but sure would
be an effort- I've heard people use visual basic for things like
this but I really don't want to know :)


> > Even better if I can package it as an installation and send to my team who
> > do not have any background in programming / R? If they can install and run
> > the exe ... it would suffice.
> >

Presumably you could make an install shield 
( http://en.wikipedia.org/wiki/InstallShield )
or other "package" using commercial
software that includes
a local copy of R or not but again they ought to be able to unzip a file
and type " ./configure" followed by "make install" for example.
I had a nightmare the other night that Excel let MBA's calculate p-values LOL...

In short, it seems the real problem is installing R as you can put
your own R code into a script and invoke R to run your script from
a bat file or bash script. 



> > Thanks,
> > S

> You could also create a .BAT file (assuming you're working under
> windows), where you execute your script using Rscript. You team will
> still need to install R.
>
> What also might work when your team is working on one network: Install R
> on a network drive. In your .BAT file you can then set up the machine
> for R (e.g. add the R binary directory to your path and tell R where to
> find the libraries). You will have to check the R Administration manual
> for the exact details. You will then only have to send your team the
> .BAT file and the R-script (which could also be on the network drive).
>
> HTH
>
> Jan
>

 		 	   		  


More information about the R-help mailing list