From chuck at sharpsteen.net  Fri Aug 20 17:02:10 2010
From: chuck at sharpsteen.net (Sharpie)
Date: Fri, 20 Aug 2010 08:02:10 -0700 (PDT)
Subject: [Rd] C or Java code generation
In-Reply-To: <4C6E4049.4090800@dbmail.com>
References: <4C6CF35F.9040305@yandex.ru> <4C6CFD45.7050007@yandex.ru>
	<AANLkTikMyRzcDHtCSb9f31v5wnN+FLrbQXAwRDg7ui1E@mail.gmail.com>
	<4C6D0BC2.7070906@yandex.ru>
	<AANLkTi=X-NfgGf3czS9t4LwUKBrUne7=1r+BO7soacEM@mail.gmail.com>
	<19565.13345.692185.626415@max.nulle.part>
	<4C6D3A53.5070808@yandex.ru>
	<19565.21908.102685.183781@max.nulle.part>
	<4C6E3DA0.7010005@yandex.ru> <4C6E4049.4090800@dbmail.com>
Message-ID: <1282316530615-2332606.post@n4.nabble.com>



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.



[Rd] C or Java code generation
Sharpie