The R Language infrastructure is available as a separate licensable component in IFS OI Server. R is an open source programming language and software environment for statistical computing and graphics that is supported by the R Foundation for Statistical Computing.
Note: Before you can use the R Script component, ensure that Microsoft R Open 3.3.3 or R.NET is installed on the same machine as IFS OI Server.
IFS OI Server provides access to R via the R Language calculation functions.
Adaptor Overview
The R Adaptor is responsible for executing R scripts for the R Language functions. This adaptor supports 64-bit R engines and allows parallel R script execution by running multiple R adaptors at once with one R engine instance in each.
The R Adaptor differs from other adaptors in that it does not appear in IFS OI Server Management. Configuring the R Adaptor is done through the ServerConfig.xml, available at:
C:\Program Files\P2 Energy Solutions\P2 Server\Configuration
Here is an example configuration:
<ConfigGroup Name="R Adaptor"> <Param Key="RHome" Value="C:\Program Files\Microsoft\R Open\R-3.4.0" /> <Param Key="RRelativePath" Value="bin\x64" /> <Param Key="RAdaptorEnabled" Value="false" /> <Param Key="RAdaptorMinPoolSize" Value="2" /> <Param Key="RAdaptorMaxPoolSize" Value="8" /> <Param Key="RAdaptorInitTimeout" Value="60" /> <Param Key="RAdaptorRequestTimeout" Value="600" /> <CollectionParam Key="RAdaptorEnabledPackages"> <Value>Package1Name</Value> <Value>Package2Name</Value> </CollectionParam> <CollectionParam Key="RAdaptorDisabledFunctions"> <Value>Function1Name</Value> <Value>Function2Name</Value> </CollectionParam> </ConfigGroup>
Parameters
RHome | Main folder of the R installation. |
RRelativePath | Relative path of the R engine within the RHome folder. |
RAdaptorEnabled | True or False. Indicates whether the R Adaptor and thus executing R scripts is enabled. Default: false |
RAdaptorMinPoolSize | The smallest number of R Adaptor instances that will always be available to execute R scripts. Default: 2 |
RAdaptorMaxPoolSize | Largest number of R scripts that the system will attempt to execute simultaneously. Default: 8 |
RAdaptorInitTimeout | Time limit (in seconds) allowed for the R Adaptor to initially set up and configure the R engine before timing out. Default: 60 |
RAdaptorRequestTimeout | Time limit (in seconds) applied to all non-initialization operations against the R Adaptor. Default: 600 |
RAdaptorDisabledFunctions | A collection of additional R functions which are not allowed to be executed in R scripts. The following functions are considered insecure and are already permanently disabled in the R Adaptor: detach(), eval(), file.remove(), install.packages(), library(), require(), shell(), source(), system(), system2(), and unlink(). If there are no additional values in the collection, use: <CollectionParam Key="RAdaptorDisabledFunctions"/> or <CollectionParam Key="RAdaptorDisabledFunctions"></CollectionParam> |
RAdaptorEnabledPackages | A collection of R packages which will be pre-loaded by the R Adaptor for executing R scripts. If a package is not in this list then it cannot be used inside an R expression. See Installing New Packages below. If there are no values in the collection, use <CollectionParam Key="RAdaptorEnabledPackages"/> or <CollectionParam Key="RAdaptorEnabledPackages"></CollectionParam> |
Installing New Packages
New packages cannot be installed from inside of IFS OI Explorer, and must be installed by the system administrator using the standard R installation functions. This has been restricted inside of Explorer so that System Administrators retaiin full control over what R Packages get installed onto the system.
To install new packages:
- Download and install the R package onto the IFS OI Server machine.
- Add the name of the new package to the RAdaptorEnabledPackages This will ensure that the R adaptor will load and allow the new R package to be used.
- Restart the Data Broker Windows service to force the R adaptor to pick up the changes.
Release History
- R Adaptor 4.17.0
- Added support the latest version of R.NET, up to R 4.4.0
- R Adaptor 4.5.4
- Initial release
Support for R began in P2 Server 4.5.4