안녕하세요 JMP 커뮤니티,
JMP 16.1 / 윈도우 10 프로
내가 해결할 수 없는 명백히 단순한 문제가 있습니다. 다음 스크립트(작동하지 않음)에서 RESPONSE SCREENING 플랫폼의 X 변수에 열 목록을 전달하려고 합니다. 연결된 문자열 변수를 사용할 수 없습니다. 따라서 열 목록(scol)을 RESPONSE SCREENING 플랫폼을 실행하기 위한 유효한 인수로 변환하려면 어떻게 해야 합니까?
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 ) ) );