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.connect
controls whether to automatically connect to OML4R inside the Embedded R Execution function. This is equivalent to doing anore.connect
call 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.drop
controls the input data. If the option value isTRUE
, a one columndata.frame
is converted to avector
. The default value isTRUE
. -
ore.envAsEmptyenv
controls whether an environment referenced in an object is replaced with an empty environment during serialization. Some types of input parameters and returned objects, such aslist
andformula
, 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.GlobalEnv
and 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.omit
controls the handling of missing values in the input data. If you specifyore.na.omit = TRUE
, then rows or vector elements, depending on theore.drop
setting, 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.frame
orvector
. The default value isFALSE
. -
ore.graphics
controls whether to start a graphical driver and look for images. The default value isTRUE
. -
ore.png.*
specifies additional arguments for thepng
graphics driver ifore.graphics
isTRUE
. The naming convention for these arguments is to add anore.png.
prefix to the arguments of thepng
function. For example, ifore.png.height
is supplied, argumentheight
is passed to thepng
function. If not set, the standard default values for thepng
function 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