Running R AEs in details
Learn how to run R As (Analytic Executables).
About this task
R Analytic Executables (AEs) are built on top of regular AEs to support the R programming language with the R environment on Netezza. The layer that handles R on Netezza is called the R Language Adapter, or the R Adapter.
The following R code sample, which assumes at least one input column, calculates the square root
of the first input column and outputs the result as the only output
column.
nz.fun <- function() {
while(getNext()) {
x <- getInputColumn(0)
setOutputDouble(0,sqrt(as.double(x)))
outputResult()
}
}