Manage R Scripts
Create an R Script
Procedure
- In the Applications menu, navigate to the TOOLS section, and then select R Scripts.The R Scripts page appears.
- Select Create New.The New R Script page appears, which contains the script editor.
- In the editor, enter your R code.Note: When you use R scripts with policies, the policy execution engine sends date inputs to the R script in UTC. If your R script performs any calculations based on dates, the date output must also be in UTC and use the standard date format yyyy-MM-dd hh:mm:ss.fff.
- Define each parameter in the R script using the Parameters pane.
- Select .The Save As window appears.
- In the Catalog pane, navigate to the location at which you want to save the R script.
- Enter values in the Name, Caption, Description, and Of type boxes.
- Select Save. The R script has been saved.
Define Parameters in R Scripts
About This Task
Procedure
- Access the R script for which you want to define parameters.
- At the bottom of the page, select Parameters.The Parameters pane appears.
- Select .A new row is added to the grid.
- In the ID cell, enter the parameter ID exactly as it appears in the R script.
- In the Name cell, enter a name for the parameter as you want it to appear to the Policy Designer user.
- In the Type list, select the data type of the parameter.
- In the Direction list, specify whether the parameter represents an input or an output to the R script.
- If the parameter is an input and is required, select the Required check box.
- For each parameter in the R script, repeat steps 3 through 8.
- Select .The R script parameters are defined.
Delete Parameters in R Scripts
Procedure
- Access the R script containing the parameter that you want to delete.
- At the bottom of the page, select the Parameters tab.The Parameters pane appears.
- On the left side of the Parameters pane, select the check boxes in the rows for the parameters you want to delete.
- In the upper-left corner of the pane, select .The parameter is removed from the Parameters pane.
- Select .The R script parameters are deleted.
Delete an R Script
Procedure
- Access the Catalog page for the folder that contains the R script that you want to delete.
- Select the check box that corresponds to the R script that you want to delete.
- In the upper-right corner of the page, select .A confirmation message appears, asking if you really want to delete the R script.
- Select OK.The R script is deleted.