How to override gWidgets:gvarbrowser_classes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to override gWidgets:gvarbrowser_classes

wampeh
How do I get gvarbrowser to display the contents of data.frame named, say "atab1"?  That is modify the "Filter by:" entries to only show data.frame

Also, how do I turn off the selection pull down box, given that I know the name of the data.frame variable?  Basically, I will like to browse the variable name in a data.frame

gdf(atab1, container =gwindow("Object browser"), expand=TRUE)
displays the data values, I an interest in showing just the names in a GUI environment similar to gvarbrowser


I tried the following

age=18:29; height=1:12;
atab1 <- data.frame(age=age,height=height)

mydefaultclasses <-  list("Data sets1"=c("data.frame")   )

v <- gvarbrowser(
  container =gwindow("Object broser"),  
  gvarbrowser_classes=mydefaultclasses
  )

This did not seem to work, displayed default selection entries

I also tried:
options("gWidgets:gvarbrowser_classes"=mydefaultclasses)

v <- gvarbrowser(  container =gwindow("Object broser"))
Reply | Threaded
Open this post in threaded view
|

Re: How to override gWidgets:gvarbrowser_classes

jverzaniNWBKZ
Try this:

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

mydefaultclasses <-  list("Data sets1"=c("data.frame")   )
w <- gwindow()
vb <- gvarbrowser(cont=w, knownTypes=mydefaultclasses)

This could be done better, but I think the above does what you want.