I am interested in being able to use R in my own libraries, written in C++.
I have seen that in the past several people have asked about this
possibility. In the book Programming in S it is stated that it is possible
to call R functions from a C++ called from R. Also, it seems it is possible
to do something with the R D-COM port, but at least for somebody with my
limited capabilities (and time) this is not a feasible possibility.

 

I have heard in the past days that both Matlab and Mathematica have modules
that compile the whole code into C++. I think that S-PLUS does something
similar with C++/Connect. Matlab is going to do something equivalent with C#
and Java next year.

 

These modules are pretty expensive (around 3,000 euros). A question to the R
popes: wouldn't it be a good idea to do something like this for R?
Advantages:

- Many people like the idea to use R as an extended library, and not being
tied to a given framework, GUI, . even, some things cannot be done with R
because they need to be implemented in a stand-alone basis;

- "You have to run to stay in the same place you were" (Alice): if other
frameworks like Matlab, Mathematica and S-PLUS do it, and if R does not do
it, "we" are staying behind;

- If this were implemented in R, the cost would be 0, adding an advantage
over the other computing frameworks, where the cost of C++ compiling is much
higher.

 

I guess that what I am proposing is easier said that done. I imagine that
there are many technical problems. There are many other interesting things
to develop. Time is limited. I know. I am being egoist: I probably would not
contribute, but I would reap the advantages. I know. But I think the
proposal makes sense.

 

What do people think about it?

 

I was just thinking in posting this email in devel, but I thought the
general forum was better.

 

 


	[[alternative HTML version deleted]]


