嗨 JMP 社区,
JMP 16.1 / Windows 10 专业版
我有一个看似简单的问题,但我无法解决。 在以下脚本(不起作用)中,我试图将列列表传递到响应筛选平台的 X 变量中。 使用连接的字符串变量不起作用。 因此,如何将列列表 (scol) 转换为运行反应筛选平台的有效参数?
Names Default to Here (1);
dt = Data table ("MYTABLE");
scol = dt << Get Selected Columns;
rse = expr (dt << Response Screening(Y(:RESPONSE), X(_Xs_), PValues Table on Launch(0)));
X_string = "";
for (i = 1, i <= N Items (scol), i++,
Insert into (X_string, scol [i]);
if (i < N items (scol), Insert into (X_string, ","), Continue ());
);
show (X_string); // The column names are stripped of the preceding quotes and following n (my column names are complex and include special characters)
rsx = substitute (Name Expr (rse), Expr (_Xs_),X_string);
show (rsx);
rs = Eval (rsx); //Fails because of Bad X argument
rsr = Report (rs);
笔记
正确的语法应该是这样的:
Response Screening(
Y( :RESPONSE ),
X(
:"X1_MOLECULE A [M_ID 001]"n, :"X2_MOLECULE B [M_ID 002]"n,
:"X3_MOLECULE A [M_ID 0056]"n
),
PValues Table on Launch( 0 )
)
谢谢。
最好的,
TS
@乔治,
谢谢。 我知道这一定很简单。 经验教训:不要使事情过于复杂。
最好的,
TS
你好@Thierry_S ,我认为这应该有效:
BR,乔治
Names Default To Here( 1 );
dt = Current Data Table();
col_sel = dt << get selected columns();
dt << response screening( y( Response ), x( Eval( col_sel ) ) );