Overview
Overview of the R Script Module
The R script tool in APM provides a way for you to utilize the R programming language to create scripts that can receive data from inputs, make calculations, and then return one or more outputs. These R scripts can then be used within Policy Designer to expand the functionality of policies.
R scripts can be as simple or as complex as you need them to be, depending on the data that you want the script to calculate. For instance, a simple R script may calculate and return a value based only on two inputs. A more complex R script might utilize ten inputs, and have ten different output values. This documentation does not cover the process of developing R code.
R Scripts in Policies
R scripts can be used within Policy Designer to expand the functionality of policies. After you create and save an R script, you can use the R Script nodes in Policy Designer to pass values into the R script, and receive calculated values out of the R script.
The parameters that you define in the R script determine how the R Script node in Policy Designer will behave. Each parameter that you specify as an input appears as a field in the Properties window for the R Script node. You can then use standard policy options to provide values to the parameters in the R script. Each parameter that you specify as an output determines what values subsequent nodes in the policy model can use for additional calculations or actions.
Access an R Script
Procedure
R Script Workflow
This workflow provides the basic, high-level steps for using this module. The steps and links in this workflow do not reference every possible procedure.
- Create a new R script.
- Enter R code in the R script editor.
- Define each parameter in the R script.
- Save the R script.
- Create a policy containing the R Script node in order to execute the R script.