# NOT RUN {
## a sample list definition
## Save some typing by defining a list to be used more than once later
TRUE.list <- list(
type = "gradio",
items = c("TRUE","FALSE")
)
## define a list for producing a histogram widget
hist.list <- list(
title = "hist()",
help = "hist",
action = list(
beginning = "hist(",
ending = ")"
),
type = "graphic", # either text or graphic
variableType = "univariate", # single variable
arguments = list(
adjustments = list(
breaks= list(
type="gdroplist",
items=c("\"Sturges\"","\"Scott\"","\"Friedman-Diaconis\"")
),
probability = TRUE.list,
include.lowest = TRUE.list,
right = TRUE.list,
shading = list(
density = list(
type="gedit",
text=NULL
),
angle = list(
type="gedit",
coerce.with="as.numeric",
text="45"
)
)
)
)
)
ggenericwidget(hist.list, container=TRUE)
## or to autogenerate one
ggenericwidget("boxplot.default", container=TRUE)
# }
Run the code above in your browser using DataLab