Skip to content
Prev 31547 / 398506 Next

how to call R function from my C++ program

I am inferring that you are using Linux, although you didn't say. Some of 
my answers are specific to Unix/Linux.
On Sat, 3 May 2003, Yan Yu wrote:

            
Yes.  You can build R as a shared library (libR.so) and link against that.
However, you will need to initialize R: see the examples in the directory
tests/Embedding in the sources, and the background URL

http://developer.r-project.org/embedded.html
No.  (Those are not for R functions, but for parts of R's C API, and 
considerable work was done to separate out that part of the API to make 
it work standalone.)
In the sources.  You installed a binary version of R.  I suspect you will 
need to build from the sources to build libR.so.