[R] Call R program from C++ code

Kisas hellokisas at gmail.com
Mon Jul 30 20:25:16 CEST 2007


Hi Vladimir:
	Thank you very much! I'm very interested in this sentence: " R can
be compiled as a shared library object, that you can dynamically load from
your application and use its functions." That's would be great if R programs
can be "compiled" as shared library object(.lib? or .dll ? ) Can you please
give more details about that? 

Best,
Feng

-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Vladimir Eremeev
Sent: 2007Äê7ÔÂ30ÈÕ 5:16
To: r-help at stat.math.ethz.ch
Subject: Re: [R] Call R program from C++ code


"Writing R Extensions" manual contains chapters dedicated to parsing and
evaluating of the R extensions from C.
Also, I vaguely remember I've seen something like "Embedding R" somewhere in
manuals.
R can be compiled as a shared library object, that you can dynamically load
from your application and use its functions.
R doesn't have a compiler, it's the interpreted language. 
However, it can parse a character string representing an expresstion and
transform it into the internal form, ready for evaluation.


Feng Qiu wrote:
> 
> Hi All:
> 
>                I'm developing an application program using C++. From my
> C++
> code, I would call some R program I have written. I' wondering if R
> provide
> some compiler that can compile R program into executable program. I
> searched
> R-help, there are a lot of posts talking about writing C++ code in R
> program, but few about calling R from C++. 
> 
>                I might be wrong that R doesn't have complier. What I'm
> trying to do is to call R program from C++ code. Any help is highly
> appreciated!
> 

-- 
View this message in context:
http://www.nabble.com/Call-R-program-from-C%2B%2B-code-tf4167083.html#a11860
280
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list