When R (an open software) is integrated properly with Statistica, you can write R script in Statistica Macro directly. Here is our R integration white paper. This article shows how to start a R scripting session and how to use R scripting in an analysis configuration under Enterprise.
Once the R analysis configuration is created, you can run it just as any other type of analysis configuration.
Or you can create customized R node in a workspace and deploy the workspace to Enterprise:
Click "File | Open Examples | Workspaces | Example_Lasso" to access the example, right click the R node to select "Edit Code" to view the R scripts.
TIBCO Analytics - Intro to Statistica 13-3