[R-sig-finance] c++ and D-COM
Dirk Eddelbuettel
edd at debian.org
Wed Aug 4 18:38:59 CEST 2004
Hi Jordi,
On Wed, Aug 04, 2004 at 06:01:55PM +0200, Molins, Jordi wrote:
>
> Hello,
>
> I would like to call R functions from C++ code. The C++ code is not called
> from an R function, but it stands by itself. I have done research through
> google and it seems that before it was not possible to do what I wanted, but
> now with the D-COM port, it is possible (comment by Prof Ripley). Prof
> Ripley says also that in the documentation of the D-COM port there are C
> examples.
>
> I have looked in the folders of the (D)COM Server, but I have not found
> anything like an example (there is an scripting folder, but contains
> jscript, python and vbs, but nothing of c++).
The good folks in Vienna (i.e., Thomas Baier and Erich Neuwierth) have a
mailing list for DCOM that may answer this better:
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
Do report back, though, I had wondered about it too. :)
> Is there a simple way to call R functions from C++ code? is it possible to
> have a simple example (like 2+2=4)?
Not from what I understand as you need to initialize the R engine (i.e. the
interpreter) but you'd get that via (D)COM. Look for comments on the
r-devel list by, say, Thomas Lumley, Brian Ripley or Simon Urbanek. Simon
also has a tcp/ip connected Rserve project that we worked with, but again,
no C examples there. Works from Java, and is platform neutral.
Hope this helps, Dirk
--
Those are my principles, and if you don't like them... well, I have others.
-- Groucho Marx
More information about the R-sig-finance
mailing list