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

From: Mucha <mucha_at_nihon.no>
Date: Tue 23 Jan 2007 - 10:12:21 GMT

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


R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue Jan 23 22:32:07 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 23 Jan 2007 - 12:30:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.