Description Usage Arguments Details Value Examples
Function must have a special markup for its argument. A named argument a..b is interpreted with b determining the type of item to use. We support numeric, string, choice, range, ??? Within the body of the function, the variable a..b should be referred to by a. The idea is that you write and debug the function as usual, then simply modify the argument list to include the types. This function will not work for functions whose arguments use lazy evaluation referring to other argument's values.
1 2 | dialogMaker(f, title = "Dialog", help_string = "", make_gui = TRUE,
add_graphic_device = FALSE, ...)
|
f |
function to make dialog for. Its arguments must be specified in a certain way. |
title |
Title for dialog window |
help_string |
String for help information |
make_gui |
If |
add_graphic_device |
If |
... |
passed to |
All arguments should have a default A choice items should have its default with a vector. The first argument is the selected one A range item is specified with values c(from=., to=..., by=..., [value=from]). If value not give, then from is used. The OK_handler will call f.
Returns an instance of aDialog
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | f <- function(x..numeric=1, y..string="a") print(list(x,y))
## Not run: dialogMaker(f)
## can have missing arguments
f <- function(x, y..numeric=1) print(list(x,y))
## Not run: dialogMaker(f)
## a choice item. Sizing is funny for tables
f <- function(x..choice=letters) print(x)
## Not run: dialogMaker(f)
## range items
f <- function(x..numeric=0, mu..numeric=0,
alternative..choice=c("two.sided","less","greater"),
conf.level..range=c(.80,1.00, .01, .95)) {
out <- capture.output(t.test(x, alt=alternative, conf.level=conf.level))
print(out)
}
## Not run: dialogMaker(f, title="CI from t.test with summarized values")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.