R Tool

The R tool is a code editor for users of R, an open-source code base used for statistical and predictive analysis. Proficiency in R scripting is recommended before using this tool.

Alteryx public gallery compatibility

Planning to publish your workflow to gallery.alteryx.com? You must first apply for an exemption. This restriction does not apply to private instances of Alteryx Server and Alteryx Gallery.

R in Designer

Designer reads in valid R script and passes the script through the tool. Output from the R tool matches R outputs.

R support

While Designer accepts custom R code, Alteryx does not provide support for it.

Alteryx uses [AlteryxFullUpdate], a global variable for the R script, for metainfo updates. Full metainfo updates occur when AlteryxFullUpdate = TRUE. This happens when the workflow is first opened and when the workflow is refreshed using F5.

AlteryxFullUpdate = FALSE during all other updates, such as a workflow being run or tool reconfiguration. To force full updates after modifying a workflow, select Run script when refreshed (F5). Update operations cannot be canceled once started.

Standard read and write functions cannot be used when AlteryxFullUpdate = TRUE. If functions such as read.Alteryx or write.Alteryx are in the script when AlteryxFullUpdate = TRUE, an error occurs.

Metainfo passed to outputs when AlteryxFullUpdate = FALSE may differ from metainfo generated when the workflow is run. This can cause errors to occur.

Configure the tool

The R tool accepts multiple inputs and labels them in order of connection as #1, #2, and so on. The tool outputs up to 5 data streams from its anchors, labeled 1 through 5. References in the code should follow the same format differences between inputs and outputs.

For the following descriptions, #1 refers to any input connection label and 5 refers to any output anchor.

The R tool outputs using the function write.Alteryx(dataVariableToWrite, 5).

Insert Code: A list of Designer-specific commands that can be injected into the R code editor. The commands are intended to be used with typical R commands. This list is not comprehensive.

R and interface tools

To access interface tools with the R tool, enter %Question.tool_name% where tool_name is the name of the interface tool, which can be found on the Annotation tab in the Configuration window