9.3.1.1 Input Function to Run
The Embedded R Execution functions all require an R function to apply during the running of the script.
You specify the input function with one of the following mutually exclusive arguments:
-
FUN
-
FUN.NAME
(and optionalFUN.OWNER
)
The FUN
argument takes a function object as a directly specified function or as one assigned to an R variable. Only a user with the RQADMIN role can use the FUN
argument when invoking an embedded R function.
The FUN.NAME
argument specifies a script that is stored in the OML4R R script repository. A stored script contains the function to apply when the script runs. Any OML4R user can use the FUN.NAME
argument when invoking an embedded R function.
The optional argument FUN.OWNER
specifies the owner of a script in the R script repository. The owner is the user who created the script. Use this argument only with the FUN.NAME
argument. When FUN.NAME
is a private script to which you have been granted read privilege access, use FUN.OWNNER
to specify the owner of the private script.
The RQSYS schema is the owner of public scripts and the predefined OML4R scripts. For a list of the predefined scripts, run help(“ore.doEval”)
and see the description of the FUN.NAME
argument. If FUN.OWNNER
is not specified or is NULL
, then OML4R looks for the owner in the following order: user of the current session, RQSYS. If the owner of the script is not current user or RQSYS, then an error occurs.
Note:
The OML4R functions in the OREmodels
package, ore.glm
, ore.lm
, ore.neural
, and ore.randomForest
, use the Embedded R Execution framework internally and cannot be used in Embedded R Execution functions.
Parent topic: Arguments for Functions that Run Scripts