1

R GUI does not open in windows command prompt

Have tried following

code in R-TestRGUI.R

library(gWidgets)
library(gWidgetstcltk)
lmwidget <- ggenericwidget(lm)

Tried calling the above script in command line using the following code

    "C:\Program Files\R\R-3.6.1\bin\x64\R.exe" 
     D:\\Esureyingsofttech\\TestRGUI.R

When the above R script is run in R the GUI gets displayed....but when the same code is executed from command prompt we get the following error

D:\Esurveyingsofttech>"C:\Program Files\R\R-3.6.1\bin\x64\Rscript.exe" D:\\Esurveyingsofttech\\TestRGUI.R
Loading required package: tcltk
Loading required package: digest
Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function '.ggroup' for signature '"NULL"'
Calls: ggenericwidget ... .ggenericwidget -> ggroup -> .ggroup -> <Anonymous>
Execution halted

The code should run in the command prompt also

January
  • 16,320
  • 6
  • 52
  • 74
srinivas
  • 37
  • 7
  • [This](https://stackoverflow.com/questions/45844658/gwidgets-ginput-function-error) somewhat related gave a hint. By adding `options(guiToolkit = "tcltk")` to the script allowed to run (but adding like `ggenericwidget("boxplot.default", container=TRUE, toolkit = guiToolkit("tcltk"))` did not) – user20650 Aug 02 '19 at 17:41

0 Answers0