To execute R scripts from FME Server, such as through the RCaller transformer in an FME Desktop workspace, you must perform the following on all machines that run FME Engines:
- Install R
- Install the sqldf package for R
Alternatively, you can direct the FME Engines to an R interpreter that is installed in a non-standard location.
Download R installers from https://www.r-project.org/.
- Run the installer that matches your FME Server bit version: 64- or 32-bit.
- Run the installer as administrator. Right-click on the installer in the Start menu and select Run as administrator.
To install R on Linux, we recommend using a package manager.
Install the sqldf package for R
Choose one of the following options:
- Standard install (perform on all machines that run FME Engines)
- Upload to Resources
- Open the R command prompt as administrator, and run the following command:
- A window launches prompting you to select a download mirror. After selecting a mirror, the sqldf package is installed to the system-wide R library.
- To verify that sqldf is installed correctly, run the following command:
The returned path should include a folder
Upload to Resources
Using an R Interpreter Installed in a Non-Standard Location
You can direct the FME Engines to use an R interpreter that is installed in a non-default location. To set the path to the interpreter you want to use, run the following command from a command prompt, on all machines running FME Engines:
Note: To avoid errors, the Windows Command Prompt must likely be run as administrator, even if you are currently running your machine with administrator privileges. From the Start Menu, right-click on Command Prompt and select Run as administrator.
<FMEServerDir>Server/fme/fme.exe APPLY_SETTINGS SYSTEM "Settings/Rscript Interpreter" <path_to_executable>
<FMEServerDir>Server/fme/fme APPLY_SETTINGS SYSTEM "Settings/Rscript Interpreter" /<path_to_executable>