[R] using R with c++

Timothy H. Keitt tklistaddr at keittlab.bio.sunysb.edu
Thu Apr 18 15:51:38 CEST 2002


In either direction, you need to use C-style linking. Lookup the "extern
C" directive in a C++ language reference. In the R-extensions manual,
there is some example code for evaluating R expressions within C/C++.

Tim

On Thu, 2002-04-18 at 08:00, Josep Perarnau i Codina wrote:
> Hi,
> 
> I know that it is possible to use C++ functions under the R environment.
> In any case my intention is the opposite way: use R functions like "glm"
> or "lm" in my  C++ code. How should I deal with this problem?
> 
> Josep. 
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list