<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic JSL: Select columns, write spec limits(call add-in), plot distributions without axis label, tabulate Cpk in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-Select-columns-write-spec-limits-call-add-in-plot/m-p/286413#M55273</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have no issue to achieve the objective in JMP.&lt;/P&gt;
&lt;P&gt;In JSL, I can do pieces, but want it not to specific cols tied to a data set.&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've referenced this post.&amp;nbsp;&lt;LI-MESSAGE title="Script multiple columns grouped in distribution plot" uid="162557" url="https://community.jmp.com/t5/Discussions/Script-multiple-columns-grouped-in-distribution-plot/m-p/162557#U162557" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;dt = Open("$Sample_Data/Semiconductor Capability.jmp");

cnames = dt &amp;lt;&amp;lt; get column names("Continuous", "string");

//Here I will just use 10

cnames = cnames[1::10];
 dist = dt &amp;lt;&amp;lt; Distribution(Columns(evalList(cnames)));&lt;/PRE&gt;
&lt;P&gt;In my case:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- my variable isn't a list of column names, but selected cols? - This breaks the dist plot&lt;/P&gt;
&lt;P&gt;- had the col grouping working, but broken here, just selecting the cols&lt;/P&gt;
&lt;P&gt;&amp;nbsp; also had a couple cases where the cols are selected, distribution platform brought up, but waiting&amp;nbsp; &amp;nbsp; &amp;nbsp; for user to select cols.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;dt = Current Data Table();
all_col_names = dt &amp;lt;&amp;lt; get column names( string );
number_columns = N Cols( dt );
dt &amp;lt;&amp;lt; 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 &amp;lt;= N Items( keyword_group_list ), i++, 
	found_list = {};

	For( k = 1, k &amp;lt;= N Items( col_names ), k++, 
			
		If( contains( col_names[k], keyword_group_list[i] )&amp;gt;0,
			Insert Into( found_list, col_names[k] );
			As Column( col_names[k] ) &amp;lt;&amp;lt; Set Selected( 1 );
			
);
	
	);

);

col_to_plot = dt &amp;lt;&amp;lt; Get Selected Columns;


distParams = dt &amp;lt;&amp;lt; Distribution(Columns(evalList(col_to_plot)));

distParams &amp;lt;&amp;lt; arrange in rows(3);

report(distParams)[OutlineBox(2)] &amp;lt;&amp;lt; Open all like this(1);   &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&amp;nbsp;&lt;LI-MESSAGE title="Write Limits to a Data Table from a Limits Table" uid="35790" url="https://community.jmp.com/t5/JMP-Add-Ins/Write-Limits-to-a-Data-Table-from-a-Limits-Table/m-p/35790#U35790" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then, I'll need suggestions how to include like below, but refer to a generic col[i]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm fine to experiment to extract the Cpk as a table from the report.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;	SendToReport(
		Dispatch(
			{"ParamOne_a"},
			"1",
			ScaleBox,
			{Label Row( Show Major Labels( 0 ) )}
		)
	)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 23:35:09 GMT</pubDate>
    <dc:creator>Turbo2020</dc:creator>
    <dc:date>2023-06-09T23:35:09Z</dc:date>
    <item>
      <title>JSL: Select columns, write spec limits(call add-in), plot distributions without axis label, tabulate Cpk</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Select-columns-write-spec-limits-call-add-in-plot/m-p/286413#M55273</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have no issue to achieve the objective in JMP.&lt;/P&gt;
&lt;P&gt;In JSL, I can do pieces, but want it not to specific cols tied to a data set.&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've referenced this post.&amp;nbsp;&lt;LI-MESSAGE title="Script multiple columns grouped in distribution plot" uid="162557" url="https://community.jmp.com/t5/Discussions/Script-multiple-columns-grouped-in-distribution-plot/m-p/162557#U162557" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;dt = Open("$Sample_Data/Semiconductor Capability.jmp");

cnames = dt &amp;lt;&amp;lt; get column names("Continuous", "string");

//Here I will just use 10

cnames = cnames[1::10];
 dist = dt &amp;lt;&amp;lt; Distribution(Columns(evalList(cnames)));&lt;/PRE&gt;
&lt;P&gt;In my case:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- my variable isn't a list of column names, but selected cols? - This breaks the dist plot&lt;/P&gt;
&lt;P&gt;- had the col grouping working, but broken here, just selecting the cols&lt;/P&gt;
&lt;P&gt;&amp;nbsp; also had a couple cases where the cols are selected, distribution platform brought up, but waiting&amp;nbsp; &amp;nbsp; &amp;nbsp; for user to select cols.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;dt = Current Data Table();
all_col_names = dt &amp;lt;&amp;lt; get column names( string );
number_columns = N Cols( dt );
dt &amp;lt;&amp;lt; 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 &amp;lt;= N Items( keyword_group_list ), i++, 
	found_list = {};

	For( k = 1, k &amp;lt;= N Items( col_names ), k++, 
			
		If( contains( col_names[k], keyword_group_list[i] )&amp;gt;0,
			Insert Into( found_list, col_names[k] );
			As Column( col_names[k] ) &amp;lt;&amp;lt; Set Selected( 1 );
			
);
	
	);

);

col_to_plot = dt &amp;lt;&amp;lt; Get Selected Columns;


distParams = dt &amp;lt;&amp;lt; Distribution(Columns(evalList(col_to_plot)));

distParams &amp;lt;&amp;lt; arrange in rows(3);

report(distParams)[OutlineBox(2)] &amp;lt;&amp;lt; Open all like this(1);   &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&amp;nbsp;&lt;LI-MESSAGE title="Write Limits to a Data Table from a Limits Table" uid="35790" url="https://community.jmp.com/t5/JMP-Add-Ins/Write-Limits-to-a-Data-Table-from-a-Limits-Table/m-p/35790#U35790" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then, I'll need suggestions how to include like below, but refer to a generic col[i]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm fine to experiment to extract the Cpk as a table from the report.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;	SendToReport(
		Dispatch(
			{"ParamOne_a"},
			"1",
			ScaleBox,
			{Label Row( Show Major Labels( 0 ) )}
		)
	)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:35:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Select-columns-write-spec-limits-call-add-in-plot/m-p/286413#M55273</guid>
      <dc:creator>Turbo2020</dc:creator>
      <dc:date>2023-06-09T23:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: Select columns, write spec limits(call add-in), plot distributions without axis label, tabulate Cpk</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Select-columns-write-spec-limits-call-add-in-plot/m-p/310924#M56417</link>
      <description>&lt;P&gt;I'm going to suggest something completely different to achieve the same objective.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Step one. Make your spec table, only include the variables you want to work with.&lt;/P&gt;
&lt;P&gt;Step two, use this example to both import the spec limits and save them to the column properties.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = dt &amp;lt;&amp;lt;
Process Capability(
	Process Variables( :OZONE, :CO, :SO2, :NO ),
	Spec Limits(
		Import Spec Limits(
			"$SAMPLE_DATA/CitySpecLimits.jmp"
		)
	)
);
obj &amp;lt;&amp;lt; Save Spec Limits as Column Properties;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That kind of reduces your example to 12 lines of code, but maybe that's ok?&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;B&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 14:47:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Select-columns-write-spec-limits-call-add-in-plot/m-p/310924#M56417</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2020-09-22T14:47:41Z</dc:date>
    </item>
  </channel>
</rss>

