cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

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