Re: [R] How can one use R-code and R-functions within C-Code?

From: Romain Francois <>
Date: Wed 22 Feb 2006 - 23:50:28 EST

Le 22.02.2006 13:25, a écrit :
> Dear everyone,
> the following problem: Our group has written a lengthy program in c++, to which we would like to add some additional features. Because we are not sure if those features are actually useful, we would prefer to take a "quick and dirty" approach just to try them out. The additional feature is that in every iteration of the algorithm membership-probabilities should by calculated by a multinomial logit or probit model. We have tried to get C/C++ code for this, but sadly neither me nor my collegue succeded in obtaining C-code for something, which has certainly already be programmed in C several times.
> But we know, that R functions like "multinom" exist, which could do the job. This is why we would like to use R-Code and R-functions within or C++ program if this is possible. So I have actually two questions: Is it feasible to use R-code and R-functions like "multinom" within a c++ program? And if so, what is the best way to implement this (how to get data from C into the R functions, how to execute the R functions within C++, how to transfer the results back to c++)?
> Moritz
> Moritz Marienfeld


For a quick (and pretty not dirty) approach, try Rserve :


visit the R Graph Gallery :
Discover the R Movies Gallery :
| Romain FRANCOIS -               |
| Doctorant INRIA Futurs / EDF                                  |

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Thu Feb 23 00:21:13 2006

This archive was generated by hypermail 2.1.8 : Thu 23 Feb 2006 - 06:23:11 EST