cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
Turbo2020
Level I

JSL: Select columns, write spec limits(call add-in), plot distributions without axis label, tabulate Cpk

Hi,

I have no issue to achieve the objective in JMP.

In JSL, I can do pieces, but want it not to specific cols tied to a data set.

Most immediate is that my list of selected cols isn't right to be evaluated as a list for the distribution platform and want to understand what to correct.

 

I've referenced this post. Script multiple columns grouped in distribution plot 

 

dt = Open("$Sample_Data/Semiconductor Capability.jmp");

cnames = dt << get column names("Continuous", "string");

//Here I will just use 10

cnames = cnames[1::10];
 dist = dt << Distribution(Columns(evalList(cnames)));

In my case:

 

- my variable isn't a list of column names, but selected cols? - This breaks the dist plot

- had the col grouping working, but broken here, just selecting the cols

  also had a couple cases where the cols are selected, distribution platform brought up, but waiting      for user to select cols.

 

dt = Current Data Table();
all_col_names = dt << get column names( string );
number_columns = N Cols( dt );
dt << Clear Column Selection;


//2. Containing Keyword Column Grouping
found_list = {};
keyword_group_list = {"ParamOne","ParamTwo"};


//3. Loop over columns keywords to  group
For( i = 1, i <= N Items( keyword_group_list ), i++, 
	found_list = {};

	For( k = 1, k <= N Items( col_names ), k++, 
			
		If( contains( col_names[k], keyword_group_list[i] )>0,
			Insert Into( found_list, col_names[k] );
			As Column( col_names[k] ) << Set Selected( 1 );
			
);
	
	);

);

col_to_plot = dt << Get Selected Columns;


distParams = dt << Distribution(Columns(evalList(col_to_plot)));

distParams << arrange in rows(3);

report(distParams)[OutlineBox(2)] << Open all like this(1);   

 

 

For writing spec limits to data table I've been using the Add in, but want to see how to integrate the call to this as part of overall script. Write Limits to a Data Table from a Limits Table 

 

Then, I'll need suggestions how to include like below, but refer to a generic col[i]

 

I'm fine to experiment to extract the Cpk as a table from the report.

 

 

	SendToReport(
		Dispatch(
			{"ParamOne_a"},
			"1",
			ScaleBox,
			{Label Row( Show Major Labels( 0 ) )}
		)
	)

 

1 REPLY 1
Byron_JMP
Staff

Re: JSL: Select columns, write spec limits(call add-in), plot distributions without axis label, tabulate Cpk

I'm going to suggest something completely different to achieve the same objective.

 

Step one. Make your spec table, only include the variables you want to work with.

Step two, use this example to both import the spec limits and save them to the column properties.

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = dt <<
Process Capability(
	Process Variables( :OZONE, :CO, :SO2, :NO ),
	Spec Limits(
		Import Spec Limits(
			"$SAMPLE_DATA/CitySpecLimits.jmp"
		)
	)
);
obj << Save Spec Limits as Column Properties;

That kind of reduces your example to 12 lines of code, but maybe that's ok?

Cheers,

B

JMP Systems Engineer, Health and Life Sciences (Pharma)