The gdf widget is used for editing data frames, but does not
have the most natural keyboard handling. The RGtk2Extras package by
Tom Taverner provides a more powerful and easier to use interface for editing data
frame, and this wraps that widget into gWidgetsRGtk2.
The addHandlerColumnClicked function can be used to add a
handler to the event when a column header is clicked. The component of
the first argument column.no contains the column number.
This widget is a bit different from the others as it is not imported
from gWidgets. As such, it won't exist until this
gWidgetsRGtk2 package is loaded. In practical terms, you need
to realize a widget before this one can be realized.
See Also
gtable
Examples
## Not run:
w<-gwindow()
g<-ggroup(cont=w)
df<-gdfedit(iris, cont=g)
## check names
names(df)
names(df)[1]<-"new"
rownames(df)
colnames(df)
## check [
df[,]
df[1,]
df[,1]
## no [<- function
## check dim stuff
dim(df)
length(df)
## handler
addHandlerColumnClicked(df, handler<-function(h,...) {
print(h$column.no)
})
## End(Not run)