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
chungman89
Level I

JSL script for summary table with for loop

Hello, I am creating a script for summary table with a for loop as there are multiple parameters from the PCM test. The script I have created was based on the JSL script generator and replace the mean () with colNames [i]. It did work but poped out 100s of data table for each parameter.

 

Previously, I had a similar issue with the graphs and a gentleman replied with the solution nw = new window(). I tried this and it did not work so I tried dt_summary = new table() and did not work either. Can I have your advice on this problem?

 

dt = Current Data Table();

// Get the all of the numeric, continuous column names
colNames = dt << get column names( string, continuous );



nw = newtable (For( i = 1, i <= N Items( colNames ), i++, // N Items( colNames ), i++,
	
	// Mean value based on Wafer number and LotID
	
	dt<< Summary(
	Group( :WF_NUM),
	Mean( colNames[i] ),
	Freq( "None" ),
	Weight( "None" )	
)));

 

Thank you for your help.

 

Dominic

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: JSL script for summary table with for loop

There is not a need for a For() loop.  All of the means can simply be done at the same time

Names Default To Here( 1 );
dt = Current Data Table();

// Get the all of the numeric, continuous column names
colNames = dt << get column names( string, continuous );
	
	// Mean value based on Wafer number and LotID
	
sumDT = dt << Summary(
	Group( :WF_NUM ),
	Mean( colNames ),
	Freq( "None" ),
	Weight( "None" )
);
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: JSL script for summary table with for loop

There is not a need for a For() loop.  All of the means can simply be done at the same time

Names Default To Here( 1 );
dt = Current Data Table();

// Get the all of the numeric, continuous column names
colNames = dt << get column names( string, continuous );
	
	// Mean value based on Wafer number and LotID
	
sumDT = dt << Summary(
	Group( :WF_NUM ),
	Mean( colNames ),
	Freq( "None" ),
	Weight( "None" )
);
Jim
chungman89
Level I

Re: JSL script for summary table with for loop

Hello @txnelson 

 

Thank you for prompt response and simple solution.

 

Regards

Dominic

Recommended Articles