I would like to know how to install and run R packages/libraries in KNME Server.
I use the R Snippet node and I install the following package in my R script:
If I execute by right click on the node, my script runs fine. However, when I execute from Server (image), I get the following error. I see that the path is the problem, but I do not know what and where can I choose the right on:
There are messages for workflow “model_testR 2019-03-25 14.33.39”
R Snippet 0:82 - ERROR: Execute failed: Error in R code:
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning in install.packages(“mlr”) :
‘lib = “/usr/local/lib/R/site-library”’ is not writable
Error: unable to install packages
Error: there is no package called ‘mlr’
Thank you very much for your support! I’ve tried around, but still it doesn’t work for me.
I found another discussion (link) and maybe I have to change the R path in the “preferences.epf” file and save it in the Server repository.
However, I don’t know how to access the server repository because our server is running in AWS.
We are able to load R ‘within KNIME’ but we are not allowed to install any new packages. That’s why we tried to point KNIME to a separate R version on our system (as described here).
We also tried to install the packages on a new defined folder install.packages(“ggplot2”, lib="/tmp/Rpackages/")),
it worked, but when we load them via library(ggplot2, lib.loc="/tmp/Rpackages/")
we get the following error: