e-Statistics > Developer Guide

comboBox

It creates a combination of <button> and <input> with title, value and R code to execute/enter/display by setting the following parameters.

TITLE Set a title to display.
R Set the R code to pass onto rclient.class for execution when the button is pressed.
imageBox Set the applet name for imageBox.class to display a graphical output if the R code requires it.
dataTable Set the applet name for dataTable.class, which allows us to choose data of a particular column from the list of columns of this specific dataTable.class.
VALUE Set an initial value to be read when it is called.
COMBO Set the list of items to be read when it is chosen. The value of parameter must be given in the format

ItemOne=x;ItemTwo=x;...;ItemN=x

Here ItemOne is the first item which has the value ValueOne to be read, ItemTwo is the second item, and so on. x can be a numeric/string value or a rclient macro of the following form



Value = @applet-name

Value = @applet-name:column-name



The parameter COMBO is superseded by the list of columns for specific dataTable.class applet if dataTable parameter is defined.

@nsize

\applet {comboBox}{nsize}{}{COMBO="10=10;50=50;100=100;500=500;1000=1000"}

@mean

\applet {comboBox}{mean}{size=6}{VALUE=0.0}

@sd

\applet {comboBox}{sd}{size=6}{VALUE=1.0}

@table

\ applet {dataTable}{table}{}{COLUMN="Mean,SD"}

Create several boxes with different choices of value and item list, and generate others by executing the following ISR style command.

\begin{comboBox} {generate}{width=150 height=25}{TITLE="Generate"}
x = rnorm(@nsize, mean=@mean, sd=@sd);
@table:Mean = mean(x);
@table:SD = sd(x);
\end{comboBox}


© TTU Mathematics