Nothing
library(gWidgets2)
if(interactive()) {
## An example of using some controls to modify which rows are displayed using visible<-
X <- mtcars
## Layout
w <- gwindow()
g <- gvbox(cont=w)
d <- gdf(X, cont=g)
b <- ggroup(cont=g)
nms <- names(X)
combo <- gcombobox(nms, cont=b)
glabel("==", cont=b) # could easily generalize
val <- gedit("", cont=b)
## Handlers.
## if entry widget is non-empty, find matches to display within selected variable
addHandlerChanged(val, handler=function(h,...) {
if (svalue(combo, index=TRUE) < 1)
return()
value <- svalue(val)
if(nchar(value) == 0)
return()
var <- X[[svalue(combo)]]
ind <- var == value
visible(d) <- ind
})
## if a new variable is changed, update the dropdown list and
## reset value
addHandlerChanged(combo, handler=function(h,...) {
vars <- sort(unique(X[[svalue(combo)]]))
val[] <- vars
svalue(val) == ""
})
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.