This widget provides an easy way to create dialogs that collect the
arguments for a function evaluation. When the OK button is clicked,
the arguments are collected and passed along to the function specified
via the action
part of the list. When collecting the arguments,
empty strings are not passed along. The easiest usage is to simply provide a function name and have
autogenerategeneric
take a stab. However, in the long run it
might be better to use autogenerategeneric
to create an initial
list, and then modify this to adjust the widget's look.
The list contains several named components
- title
{The title for the widget}
- help
{What help page is called}
- type
{Either "text" or "graphic." Currently ignored.}
- variableType
{Describes the type of variable. Either
"univariate", "univariatetable","fileurl","bivariate", "model",
"lattice", "lmer" or NULL
.
This value is passed directly to gvariables
.
For non-NULL values, the widget shows an
appropriate area for collecting the main variable. For the
model and lattice interfaces buttons allow editing of fields
by subsequent dialogs. }
- variableTypeExtras
{An optional list with components name
and value
containing a name and value passed along to the
constructor for the variable type. Useful to override default
}
- assignto
{If TRUE, creates box for collecting name for
assigning output}
- action
{a list with named components beginning
and ending
. The arguments are collected and pasted
together to form a string containing the R command to
execute. These get put at the beginning and end of the
string. A typical pair would be something like "prop.test("
and ")".}
- arguments
{a list with named components. In the simplest
usage the names are argument names, and the components are
lists with entries that create the corresponding widget. The
first such component is called type
and is the name of
a gWidget, such as "gradio"
. Subsequent components are
passed to this function using do.call
.
The constructors geditlist
and geditnamedlist
can be
used when the input is to be a list of values or a list of named values.
In the more complicated cases, these named components can be
grouped into a list component. The name of this is then used
to block the arguments. See the example.
}
The svalue
method returns the value of the list. This can be
used to retrieve the list that is created when the constructor is
called with a function name.