2

I am a relatively new user to KNIME. I have been trying to install the 'gWidgetsRGtk2' package through the R snippet, but it keeps throwing me an error when i try to load it.

if(require("gWidgetsRGtk2")){
  print("gWidgetsRGtk2 is loaded correctly")
}else{
  print("Trying to install gWidgetsRGtk2")
  install.packages("gWidgets",dependencies=TRUE)

options("guiToolkit"="RGtk2")

I have tried changing the R path in the global preferences, and also tried adding this package directly into the KNIME-R folder.

None of these methods seem to work. Can anyone suggest a way out?

Aaron
  • 21
  • 3
  • I usually have a separate installation for R and install the packages there. Then, I just set the R path in `File`|`Preferences`|`KNIME`|`R`|`Path to R Home` (like: `C:\Users\demo\Documents\R\R-2.15.2`). – Gábor Bakos Aug 08 '14 at 07:54
  • I've tried that already. Doesn't make a difference. Have you tried using this specific package? Wondering if it is a package incompatibility? – Aaron Aug 08 '14 at 08:36
  • Have you tried this: `install.packages("gWidgetsRGtk2",dependencies=TRUE)`? – landroni Aug 08 '14 at 12:23
  • My guess is that `RGtk2` isn't getting installed. Can you check that first: `require(RGtk2)`? – jverzani Aug 09 '14 at 13:34
  • jverzani - That is the problem. RGtk2 is not getting installed. landroni - I have tried installing. Throws me error on loading package. – Aaron Aug 11 '14 at 03:42

1 Answers1

1

To solve the package installation part ...

  • go to File > Preferences > Knime > R and
  • copy Path to R Home
  • now open the path (in console or in Explorer)
  • execute the R executable in bin directory
  • the R console used in Knime is all yours
petermeissner
  • 12,234
  • 5
  • 63
  • 63