Apama 10.15.3 | Developing Apama Applications | Developing Apama Applications in EPL | Using EPL Plug-ins | Using the R plug-in | Introduction to using the R plug-in
 
Introduction to using the R plug-in
R is a free software environment for statistical computing. See https://www.r-project.org/ for more information on R.
The Apama R plug-in connects to R using the Rserve package. See https://rforge.net/Rserve/index.html for more information on Rserve.
Prerequisites
You must install R, and you must install the Rserve package into R. After that, you can run Rserve using an appropriate configuration.
The Apama R plug-in uses a TCP connection to communicate with R. A host and port are supplied when opening the connection. The R server process can run locally on the same machine as Apama, or on a remote server. Rserve uses 6311 as the default port. You can change this default in the Rserve configuration and when creating the connection within Apama. See Steps for using the R plug-in for further information.
Note:
Rserve has different session functionality, depending on whether the server is running on Windows or Linux. On Windows, new sessions are not created, if you re-connect to Rserve; previously set variables will still be valid.
To use the R plug-in, you need to add the R Support bundle to your Apama project (see also Adding the R Support bundle to your project). This lets you interact with a local or remote R running Rserve, setting and getting variables and evaluating R script from within EPL.