[Rd] C or Java code generation

Sharpie chuck at sharpsteen.net
Fri Aug 20 17:02:10 CEST 2010



Romain Francois wrote:
> 
> Hi,
> 
> It installs just like any other R package, there is no need for a
> Makefile.
> 
> $ R CMD RInside_0.2.3.tar.gz
> 

Should probably be:

  R CMD INSTALL RInside_0.2.3.tar.gz


But are we misleading the OP a little bit about what RInside can help him
do?  His original question was:


Vyacheslav Karamov wrote:
> 
> Hi All!
> 
> I'm new to R and I need to know is it possible for R to generate C/C++ 
> source code, Java byte code or native Win32 DLL like MatLab?
> 

He stated that he was looking for this because:


Vyacheslav Karamov wrote:
> 
> Is there any posibility to use R without installing?
> I mean that I have my own application written in MS Visual C++ and I 
> need to use R script in this app. I can install R and use it via DCOM, 
> but it's not convenient for  the end users of my  program.
> 


I think the proper answer to this question is: R is an interpreted language. 
There is not any developed way to compile R code to machine code, an
executable or a library that can be distributed to a computer that does not
have a copy of R installed.


R does include a library with various names such as R.a, libR.so and R.dll
that contains the R interpreter and support functions which could be used to
distribute a stand alone executable that can run R code without the R
distribution being installed.

However the sticking point is packages; the OP is likely trying to embed R
in order to gain access to one, or several, R packages.  As far as I know,
there is no developed way to compile an R package down such that it could be
distributed, perhaps along with R.dll, and stand by its self.

It is theoretically possible, but there is no turnkey solution.


So, unless I am gravely mistaken, RInside is just a nice cross-platform
replacement for the RDCOM interface.  It won't solve the problem of needing
R installed on the client's computer in order to fully use the R environment
which is dependent on packages.

-Charlie

-----
Charlie Sharpsteen
Undergraduate-- Environmental Resources Engineering
Humboldt State University
-- 
View this message in context: http://r.789695.n4.nabble.com/C-or-Java-code-generation-tp2330875p2332606.html
Sent from the R devel mailing list archive at Nabble.com.



More information about the R-devel mailing list