9.4.1 About Oracle Machine Learning for R SQL Table Functions
OML4R provides SQL table functions that are equivalents of most of the R interface functions for embedded R execution.
Executing a SELECT FROM TABLE
statement and specifying one of the table functions results in the invocation of the specified R script. The script runs in one or more R engines on the Oracle Database server.
The SQL table functions for embedded R execution are:
-
rqEval2
-
rqGroupEval2
-
rqRowEval2
-
rqTableEval2
The R interface functions and the SQL equivalents are listed in Table 9-1.
For the rqGroupEval2
function, OML4R provides a generic implementation of the group apply functionality in SQL. You must write a table function that captures the structure of the input cursor.
See the reference pages for the functions for information about them, including examples of their use.
Some general aspects of the SQL table functions are described in the following topics:
- Parameters of the SQL Table Functions
The SQL table functions have some parameters in common and some functions have parameters that are unique to that function. - Return Value of SQL Table Functions
The Oracle Machine Learning for R SQL table functions return a table. - Connect to Oracle Machine Learning for R in Embedded R Execution
To establish a connection to OML4R on the Oracle Database server during the Embedded R Execution, you can specify the control argumentore.connect
in the parameters list.
Parent topic: SQL Interface for Embedded R Execution