# NOT RUN {
DF <- mtcars[, c("mpg", "cyl", "hp", "am", "wt")]
w <- gwindow("Example of gfilter", visible=FALSE)
pg <- ggroup(container=w)
df <- gtable(DF, container=pg)
a <- gfilter(df, initial.vars=data.frame(names(DF), names(DF),
c("single", "multiple", "range", "single", "range"),
stringsAsFactors=FALSE),
allow.edit=TRUE,
container=pg,
handler=function(h,...) {
visible(df) <- h$obj$get_value()
}
)
size(w) <- c(600, 600)
visible(w) <- TRUE
# }
Run the code above in your browser using DataLab