R Integration Support Macros (R.svb and R.r)
Statistica installation includes a Statistica Visual Basic macro called R.svb and an R script called R.r. These files contain the support code required to manage interactions through COM in Statistica and the R side respectively. When an R script is executed in Statistica, it is parsed by the support macro, which then transfers data and script parameters, submits script content to the R environment, manages error conditions, and also handles script outputs, ensuring that they are properly transferred back to Statistica. Support script R.r implements Statistica-specific R language extensions functions; one of its primary responsibilities is translating Statistica Spreadsheets to R data frames and back.
Although the support code is write-protected by default, it is accessible for inspection and can be modified or enhanced to support new functionality required for specific use cases, although users should do so at their own risk. The R.svb macro supports standalone execution to simplify debugging and testing of modifications.