FME Flow: 2025.0

Using R with FME Flow

To execute R scripts from FME Flow, such as through the RCaller transformer in an FME Form workspace, you must perform the following on all machines that run FME Engines:

  1. Install R
  2. 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.

Install R

Download R installers from https://www.r-project.org/.

Windows

Run the installer as administrator. Right-click on the installer in the Start menu and select Run as administrator.

Linux

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

Standard Install

  1. Open the R command prompt as administrator, and run the following command:
  2. install.packages('sqldf')

  3. 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.
  4. To verify that sqldf is installed correctly, run the following command:
  5. .libPaths()

    The returned path should include a folder sqldf.

Upload to Resources

Use the Upload tool on the Resources page of the FME Flow Web User Interface, and upload the package libraries under Engine\Plugins\R.

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:

Windows

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.
  • <FMEFlowDir>Server/fme/fme.exe APPLY_SETTINGS SYSTEM "Settings/Rscript Interpreter" <path_to_executable>

Linux

  • <FMEFlowDir>Server/fme/fme APPLY_SETTINGS SYSTEM "Settings/Rscript Interpreter" /<path_to_executable>