I am experiencing a strange problem with R Snippets in KNIME 3.5.3 on a macOS (high sierra 10.13.4 (17E202)) system since switching to the newest R version 3.5. It seems to be there with every R Snippet I use that generates an output table, the system is not able to get back knime.out parameters and throws strange error messages. The first part using R does work so there does not seem to be a general R problem.
Well yes I tried to reinstall R, I made sure I have RServe and Cairo up and running and I also tried starting RServe separately and I tried to use every variant of R Scripting there is. And yes I also installed XQuartz …
It looks as if the KNIME R Snippets are expecting some meta variables or something that might not be there anymore with R 3.5.
I am wondering if other macOS users also have this problem or if I have to look further into my configuration.
I have similar issues but I just started using KNIME and was trying some tutorials.
I use macOS and installed both R and KNIME via homebrew.
I have both RServe and Cairo available.
Errors look like this: ERROR: Could not execute internal command.ERROR: R evaluation failed.: "sapply(ls(),function(a)class(get(a,envir=globalenv())))"ERROR: R evaluation failed.: "sapply(ls(),function(a)class(get(a,envir=globalenv())))"ERROR: eval failed
All codes are working fine with just ‘pure’ R. Also the left Node with the Replacement of NAs works fine. The moment I try to get to the result it does not work. I tried to call the library Cairo but there is no specific function in the right node, it just tries to retrieve the result (which is already there).
This does not work regardless which kind of R Snippet I use. For me it looks like something changed in R 3.5 which KNIME is relying on. It could be that it tries always to put some example PNG files in a folder and maybe R does not do that anymore.
The fact that jonasfoe has the exact same result on his macOS system leads me to the assumption that there is a more general problem.
I also attached a part of the knime.log when the right node fails. If you could have another look or maybe try to do this on a recent macOS system it would be highly appreciated.
OK i switched from homebrew R to the package provided by CRAN and I also installed XQuartz.
Now I’m good but I cannot attest to the original problem in this thread. I think mine might have been different.
I have installed the latest version of Java for macOSX (Version 8 Update 171 (Build 1.8.0_171-b11)) but the problem is still there and I would be surprised if this is the reason because the first part of the workflow just works fine, only the part where the output should be retrieved is not working.
If just evaluating the R nodes that actually work they still produce an error message
ERROR: Could not execute internal command.ERROR: R evaluation failed.: "sapply(ls(),function(a)class(get(a,envir=globalenv())))"ERROR: R evaluation failed.: "sapply(ls(),function(a)class(get(a,envir=globalenv())))"ERROR: eval failed
For me this looks like something in R 3.5 changed that the R nodes of KNIME just assume would be there (some global setting, some PNG examples to be put somewhere). Some way the knime.out location gets transmitted.
Again it would be good if someone could try to reproduce the phenomenon on a macOSX machine.
And yes I know it is more likely that a stupid user does not know how to properly set up R in KNIME (and then on a Mac, oh boy …) than that there is a freak combination of changes in settings and so on. But unfortunately over the years I have encountered more and more of this occasions where I as a quite seasoned user stumbled across such freak combinations that cannot be dealt with by ‘try reboot’
I ran into the same problem on Linux (Arch) with KNIME 3.5.3 (KNIME Interactive R Statistics Integration 3.5.1.v201712211140) and R 3.5. I manually compiled R 3.4.4 (making sure to pass --enable-R-shlib to ./configure) and changed the R home configuration in KNIME, and it worked again.
So, as suggested, this is most likely something that has changed in R 3.5 (and is not specific to macOS).