Frage

On ubuntu 12.04 I installed gWidgets and am intending to use RGtk2 binding. Now, invoking of single components like

obj <- gbutton("hello man!", container = gwindow()) 

works, but whit other basic function

win <- gwindow("main app")
group <- ggroup(container = win)

I get the error I usually get when something`s not installed

Error in add(tag(obj, "contentPane"), value, expand = TRUE, fill = "both") : 
  error in evaluating the argument 'obj' in selecting a method for function 'add': Error     
  in function (classes, fdef, mtable)  : unable to find an inherited method for function   
 ".tag", for signature "<invalid>", "guiWidgetsToolkitRGtk2"

I tried reinstalling, both libgtk-dev, and R and gWidgets but nothing worked.

Any ideas?

War es hilfreich?

Lösung

Hmm, this seems to be an issue with the gwindow object being invalidated before it is passed on as a container to the group container. I've seen similar issues arise when the toolkit isn't specified. To see if that is cause of this issue, try copy-and-pasting this code:

library(gWidgets)
options(guiToolkit="RGtk2")

w <- gwindow()
g <- ggroup(cont=w)
l <- glabel("it is working", cont=g)

Andere Tipps

I was getting the same error. I realized I did not install the dependencies so I installed the cairoDevice package and it worked beautifully. Hope this works.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top