Skip to main content
Solved

RCaller - sqldf error

  • May 15, 2019
  • 1 reply
  • 32 views

willydevera
Contributor
Forum|alt.badge.img+9

Hi,

I upgraded R version to 3.5.1 as well as its libraries. Unfortunately I ran in to the same sqldf error message again that I encountered sometime last September 2017 when I was using R 3.2.

I know Liz advised me that the solution is to install R libraries as Administrator, but then I realized that this would be a challenge for FME/R users every time R is upgraded, which happens almost every 6 months.

Question is: Is there a workaround such that the FME Desktop or RCaller transformer could be configured to access packages or libraries from a specified path, regardless of whether they are installed as a client/user or Administrator?

Please advise.

Thanks,

 

Wilfredo

Best answer by samatsafe

Hi @willydevera,

Managing R installations and packages can be quite tricky. It also varies by OS. I'll give a bit of an overview here, though you might not need it.

First of all, I would refer you to the CRAN R documentation on installation. Second, I would suggest you verify where you or other FME users are installing their R packages. You can do this by typing .libPaths() in your R command line. I'd also suggest reading through the pages accessed via the R commands help(install.packages) and help(Startup).

In order for FME to access your packages, they must be in either your R install library folder or in an FME Shared Resource folder. For me on Windows, my R install library location is C:\Program Files\R\R-3.5.0\library. The FME Shared Resource folder for libraries by default In Windows is located in ..\Documents\FME\Plugins. You can change it under Tools > FME Options > Default Paths > Shared FME Folders.

I would also check your upgrade procedure. I recommend using an R package like installr to manage upgrades for you. In any case, make sure you are moving over your packages from the old R install and updating the path to the R executable under Tools > FME Options > Translation, as it will probably change when you update R.

Finally, you could try loading a package in RCaller using the lib.loc argument of the library() function. That lets you load a library from a specific library path. Using this method, you should be able to access user-installed packages:

library(mypkg, lib.loc = "C:/R-packages")

All that said, if you successfully transfer over your old packages to the new admin install location and point FME to the upgraded executable, the RCaller should continue to work fine. If that's not the case, please let us know and we can dig a little deeper.

View original
Did this help you find an answer to your question?

1 reply

samatsafe
Safer
Forum|alt.badge.img+8
  • Safer
  • Best Answer
  • May 16, 2019

Hi @willydevera,

Managing R installations and packages can be quite tricky. It also varies by OS. I'll give a bit of an overview here, though you might not need it.

First of all, I would refer you to the CRAN R documentation on installation. Second, I would suggest you verify where you or other FME users are installing their R packages. You can do this by typing .libPaths() in your R command line. I'd also suggest reading through the pages accessed via the R commands help(install.packages) and help(Startup).

In order for FME to access your packages, they must be in either your R install library folder or in an FME Shared Resource folder. For me on Windows, my R install library location is C:\Program Files\R\R-3.5.0\library. The FME Shared Resource folder for libraries by default In Windows is located in ..\Documents\FME\Plugins. You can change it under Tools > FME Options > Default Paths > Shared FME Folders.

I would also check your upgrade procedure. I recommend using an R package like installr to manage upgrades for you. In any case, make sure you are moving over your packages from the old R install and updating the path to the R executable under Tools > FME Options > Translation, as it will probably change when you update R.

Finally, you could try loading a package in RCaller using the lib.loc argument of the library() function. That lets you load a library from a specific library path. Using this method, you should be able to access user-installed packages:

library(mypkg, lib.loc = "C:/R-packages")

All that said, if you successfully transfer over your old packages to the new admin install location and point FME to the upgraded executable, the RCaller should continue to work fine. If that's not the case, please let us know and we can dig a little deeper.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings