Hi!
There are multiple tips on how to solve this issue. I think I have tried them all, but just to document and see if I have skipped some part.
Challenge: You get the error message when trying to run an RCaller:
2020-02-04 08:36:56| 0.6| 0.0|ERROR |RCaller_2 (InlineQueryFactory): Failed with exit code 1 when executing R script. Output was: Error in library("sqldf") : there is no package called 'sqldf'
Solution
1. Check if sqldf is installed correctly:
Do:
- Start cmd.bat / command line in "ADMINISTRATOR MODE"
- Navigate to where R is installed and the 32 or 64-bit R. Same version as your FME (I have 64-bit): C:\Program Files\R\R-3.6.1\bin\x64
- run R.exe
- Run and select your closes mirror
install.packages("sqldf")
The reply for my pat is:
> install.packages("sqldf")
Installing package into 'C:/Users/XXXX/Documents/R/win-library/3.6'
(as 'lib' is unspecified)
--- Please select a CRAN mirror for use in this session ---
trying URL 'https://cran.uib.no/bin/windows/contrib/3.6/sqldf_0.4-11.zip'
Content type 'application/zip' length 78436 bytes (76 KB)
downloaded 76 KB
package 'sqldf' successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\XXX\AppData\Local\Temp\RtmpW60Obp\downloaded_packages
>
Now when I run
.libPaths()
The new package is NOT listed:
> .libPaths()
l1] "C:/Users/nosihg/Documents/R/win-library/3.6"
r2] "C:/Program Files/R/R-3.6.1/library"
So I am guessing the package does not get installed since it is not listed
I also tried the optional approach:
Optionally, you can place your R libraries in a shared resources folder. The location of this folder is set in Workbench under Tools > FME Options > Default Paths > Shared FME Folders.
In Windows, the R folder is located by default in Documents > FME > Plugins.
Additional modules dropped into the R folder will be picked up by FME.
However not sure if they can be zipped or needs to be unzipped etc. And if they can be on a network folder or not.