显示一个文本框,要求用户输入你好,
我想添加文本编辑框,要求用户输入 Q 和尾分位数的值以探索异常值。 这是我尝试过的,但似乎我错过了一些东西。 你能建议这可能有帮助吗?
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Water Treatment.jmp");
check_list = {"SS", "SE", "PH"};
todo_list = {};
nw = new window("Checkboxes", << modal(),
"Input",
V List Box( Text Box( "Enter Tail Quantile " ), tail = Text Edit Box() ,
Text Box( "Enter Q Value " ), quan = Text Edit Box() ),
my_cb = checkbox(check_list),
panelbox("Actions",
hlistbox(
button box("OK",
ta = tail << get text();
qu = quan << get text();
keep_going = 1;
todo_list = my_cb << get selected;
),
button box("Cancel", keep_going = 0)
),
),
);
For(i = 1, i <= N Items(colList), i++,
If(Contains(colList[i], "SS"), Insert Into(filteredCols, colList[i]))
);
obj = dt <<
Explore Outliers(
Y((Eval(filteredCols) )));
obj << Quantile Range Outliers;
obj << Tail Quantile (ta);
obj << Q(qu);
obj << Select Rows(All);
数据混合和清理回复:显示一个文本框,要求用户输入我会尝试对分析进行逆向工程。使用所需的参数/列手动进行分析。然后单击红色小箭头并选择将脚本保存到剪贴板或脚本窗口的选项。使用该脚本代替您拥有的脚本,并替换新窗口中的变量。
回复:显示一个文本框,要求用户输入@pmroz有什么建议吗?
回复:显示一个文本框,要求用户输入谢谢@pmroz ,
该脚本工作正常,但问题是它使用默认值来评估异常值而不是输入值。 请参阅下面的屏幕截图
以下分析基于尾分位数为 0.1、Q 为 3。 我输入的是0.4。和 3 在编辑框。 我厌倦了使用重做分析,但它不会选择窗口中的所有行。 有什么建议吗?

回复:显示一个文本框,要求用户输入一些修改 - 您的原始代码没有初始化一些东西。我使用数字编辑框()和阵容框()以获得更好的外观。数字编辑框仅允许输入数字。

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Water Treatment.jmp");
check_list = {"SS", "SE", "PH"};
todo_list = {};
nw = new window("Checkboxes", << modal(),
text box("Input"),
Lineup Box( N Col( 2 ),
Text Box( "Enter Tail Quantile: " ), tail = number Edit Box() ,
Text Box( "Enter Q Value: " ), quan = number Edit Box()
),
my_cb = checkbox(check_list),
panelbox("Actions",
hlistbox(
button box("OK",
ta = tail << get();
qu = quan << get();
keep_going = 1;
todo_list = my_cb << get selected;
),
button box("Cancel", keep_going = 0)
),
),
);
collist = dt << get column names(string);
filteredcols = {};
For(i = 1, i <= N Items(colList), i++,
If(Contains(colList[i], "SS"), Insert Into(filteredCols, colList[i]))
);
obj = dt << Explore Outliers( Y((Eval(filteredCols) )));
obj << Quantile Range Outliers;
obj << Tail Quantile (ta);
obj << Q(qu);
obj << Select Rows(All);回复:显示一个文本框,要求用户输入尾分位数和 Q 条目都必须是数字,而不是字符串/文本。使用 Num() 函数进行转换。