9.3.1.2 Optional and Control Arguments
All of the Embedded R Execution functions take optional arguments, which can be named or not.
Oracle Machine Learning for R passes user-defined optional arguments to the input function. You can pass any number of optional arguments to the input function, including complex R objects such as models.
Arguments that start with ore. are special control arguments. OML4R does not pass them to the input function, but instead uses them to control what happens before or after the running of that function. The following control arguments are supported:
-
ore.connectcontrols whether to automatically connect to OML4R inside the Embedded R Execution function. This is equivalent to doing anore.connectcall with the same credentials as the client session. The default value isFALSE.If an automatic connection is enabled, the following functionality occurs:
-
The embedded R script is connected to the database.
-
The connection has the same credentials as the session that calls the Embedded R SQL function.
-
The script runs in an autonomous transaction.
-
ROracle queries can work with the automatic connection.
-
OML4R transparency layer functionality is enabled in the Embedded script.
-
-
ore.dropcontrols the input data. If the option value isTRUE, a one columndata.frameis converted to avector. The default value isTRUE. -
ore.envAsEmptyenvcontrols whether an environment referenced in an object is replaced with an empty environment during serialization. Some types of input parameters and returned objects, such aslistandformula, are serialized before being saved to the database. If the control argument value isTRUE, then the referenced environment in the object is replaced with an empty environment whose parent is.GlobalEnvand the objects in the original referenced environment are not serialized. In some cases, this can significantly reduce the size of serialized objects. If the control argument value isFALSE, then all of the objects in the referenced environment are serialized and can be unserialized and recovered later. The default value is regulated by the global optionore.envAsEmptyenv. -
ore.na.omitcontrols the handling of missing values in the input data. If you specifyore.na.omit = TRUE, then rows or vector elements, depending on theore.dropsetting, that contain missing values are removed from the input data. If all of the rows in a chunk contain missing values, then the input data for that chunk will be an emptydata.frameorvector. The default value isFALSE. -
ore.graphicscontrols whether to start a graphical driver and look for images. The default value isTRUE. -
ore.png.*specifies additional arguments for thepnggraphics driver ifore.graphicsisTRUE. The naming convention for these arguments is to add anore.png.prefix to the arguments of thepngfunction. For example, ifore.png.heightis supplied, argumentheightis passed to thepngfunction. If not set, the standard default values for thepngfunction are used.
See Also:
For more details about control arguments, see the online help displayed by invoking help(ore.doEval)
Parent topic: Arguments for Functions that Run Scripts