Working modes

The most straightforward way of constructing an R Analytic Executable requires the definition of the nz.fun object, followed by successful compilation and registration. Keep in mind that the nz.mode object takes the value of run by default. For aggregates, it must be set to aggregate.

In general, the nz.mode object controls the working mode.

The available modes are:
  • The run mode assumes that the user provides all necessary control structures, including the main loop while(getNext()){...}.
  • The aggregate mode assumes a different situation. The UDX is not a UDF or UDTF, but a UDA, which means state-based processing, state variables, and so on.
  • The apply mode removes the requirement for the loop that is presented in the example for the run mode.
  • The nztapply mode implements a form of grouped apply and is used with the nzTApply function from the nzLibrary for R client package.
  • The install mode enables CRAN packages installation.
  • The groupedapply mode is an equivalent for the tapply mode that you can run without the nzLibrary for R client package.