| gdfedit {gWidgetsRGtk2} | R Documentation |
An alternative widget for editing a data frame using the RGtk2DfEdit package
gdfedit(items = NULL,
name = paste(deparse(substitute(items)), "1", sep="."),
container = NULL, ..., toolkit = guiToolkit())
items |
data frame to be edited |
name |
Name of data frame to save value to |
container |
An optional container to attach widget to |
... |
Can be used to overide default colors. |
toolkit |
Which GUI toolkit to use |
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.
gtable
## 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)