9.3.7 Use the ore.indexApply Function
The ore.indexApply function executes the specified user-defined input function using data that is generated by the input function.
The function supports task-parallel execution, in which one or more R engines perform the same or different calculations, or task. The times argument to the ore.indexApply function specifies the number of times that the input function executes in the database. Any required data must be explicitly generated or loaded within the input function.
The syntax of the ore.indexApply function is the following:
ore.indexApply(times, FUN, ..., FUN.VALUE = NULL, FUN.NAME = NULL, FUN.OWNER = NULL,
parallel = getOption("ore.parallel", NULL))The ore.indexApply function returns an ore.list object or an ore.frame object.
- Simple Example of Using the ore.indexApply Function
The example callsore.indexApplyand specifies that it runs the input function five times in parallel. - Column-Parallel Use Case
The example uses the Rsummaryfunction to compute in parallel summary statistics on the first four numeric columns of theirisdata set. - Simulations Use Case
You can use theore.indexApplyfunction in simulations, which can take advantage of high-performance computing hardware like an Oracle Exadata Database Machine.
Parent topic: R Interface for Embedded R Execution