cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Thierry_S
Super User

JMP > JSL > Response Screening > Populate columns from Column Selection?

Hi JMP Community,

JMP 16.1 / Windows 10 Pro

I have an apparently simple problem that I cannot resolve. In the following script (which does not work), I am attempting to pass a List of columns into the X variables from the RESPONSE SCREENING platform. Using a concatenated string variable does not work. Hence, how do I convert the Column List (scol) into a valid argument for running the RESPONSE SCREENING platform?

 

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);

NOTES

 

This what the correct syntax should look like:

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 )
)

Thanks.

Best,

TS

Thierry R. Sornasse
1 ACCEPTED SOLUTION

Accepted Solutions
Georg
Level VII

Re: JMP > JSL > Response Screening > Populate columns from Column Selection?

Hi @Thierry_S , I think this should work:

BR, Georg

Names Default To Here( 1 );

dt = Current Data Table();

col_sel = dt << get selected columns();
dt << response screening( y( Response ), x( Eval( col_sel ) ) );
Georg

View solution in original post

2 REPLIES 2
Georg
Level VII

Re: JMP > JSL > Response Screening > Populate columns from Column Selection?

Hi @Thierry_S , I think this should work:

BR, Georg

Names Default To Here( 1 );

dt = Current Data Table();

col_sel = dt << get selected columns();
dt << response screening( y( Response ), x( Eval( col_sel ) ) );
Georg
Thierry_S
Super User

Re: JMP > JSL > Response Screening > Populate columns from Column Selection?

@Georg ,

Thanks. I knew it must be simple. Lessons learned: do not over-complicate things.

Best,

TS

Thierry R. Sornasse

Recommended Articles