Scalar Function and Scalar Function Factory R Interface

This section describes information that is specific to the R API. See R SDK API Documentation for general information about implementing Scalar functions.

Scalar Function API

The API provides the following framework for extension by R function:

FunctionName <- function(input.data.frame, parameters.data.frame) {
  # Computations

  # The function must return a data frame.
  return(output.data.frame)
}

Scalar Function Factory API

The API provides the following framework for extension by R function:

FunctionNameFactory <- function() {
  list(name    = FunctionName,
       udxtype = c("scalar"),
       intype  = c("int"),
       outtype = c("int"))
}

For a complete list of factory options, see the R API documentation for Factory Function.