[R] Calling R function from C++ when C++ was not invoced by R, or Calling R from PL/SQL

Mucha mucha at nihon.no
Tue Jan 23 11:12:21 CET 2007

I have what many might consider a strange problem. I have about 250 lines
of R code that I need to use in my system. (Need because I do not
understand it enough to translate it to anything else). 

The final purpose is to use it from a PL/SQL function in Oracle 10g. The
previous version of this system called it directly from the DB
(PostgreSQL) in form of PL/R, I haven't found Oracle to have this
capability. So I'm thinking that the solution might be to make a short C++
wrapper for the R function. 

Looking at the documentation I was only able to run R functions in C++ if
the C++ function was first invoked by R, because I needed the environment
and had trouble with casting the result to something comprehend able by C++.

So my two questions is:
1) Is it possible to call a R function from PL/SQL, and how?
2) Is it possible to call a R function from C++ without the C++ function
being invoked by R, and how? 

I hope some one is able to point me in the right directions. 

yours sincerely


More information about the R-help mailing list