Information for:

# R Model node¶

The R Model node allows arbitrary R Language scripts to be executed as part of a graph.

The R node allows functions to be defined which can be passed optional arguments. The return value of the function is the value of the last expression in the function.

All arguments are passed as strings, and so type conversions are necessary before manipulation as numeric values.

In a graph, it is necessary to map the input arguments, and the return value from the function.

## Vector arguments and return values¶

A vector can be represented in JSON as a string field with separators. A string field, using a comma as a separator, can be used as an input value and transformed into an R vector of numeric values.

Similarly, return vectors can be transformed into separated string fields using the paste() function.

## Creating an R node¶

To create an R node, perform the following actions: