<?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 Tabulate all numeric columns in a table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/268685#M52298</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to creat a tabulate table that cill contain all numeric columns (and then another one with the categorical ones).&lt;/P&gt;&lt;P&gt;I tryed running this but it doesn't work.&lt;/P&gt;&lt;P&gt;Any suggestion?&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
	NumericCols = {};
	for(i = 1, i &amp;lt;= N Cols(dt), i++,
		Col = Column(dt,i);
		ColDataType = Col &amp;lt;&amp;lt; Get Data Type; 
		If( ColDataType == "Numeric",
			Insert Into(NumericCols,Col &amp;lt;&amp;lt; Get Name);
			);
		);


Tabulate(	
	Set Format( Uniform Format( 10, 2 ) ),
	Add Table(
		Column Table( Statistics( N ) ),
		Column Table( Statistics( Mean ) ),
		Column Table( Statistics( Std Dev ) ),
		Column Table( Statistics( Min ) ),
		Column Table( Statistics( Max ) ),
		Column Table( Statistics( Median ) ),
		Row Table(
			Analysis Columns(
				NumericCols = {}
			)
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 24 May 2020 17:41:44 GMT</pubDate>
    <dc:creator>eliyahu100</dc:creator>
    <dc:date>2020-05-24T17:41:44Z</dc:date>
    <item>
      <title>Tabulate all numeric columns in a table</title>
      <link>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/268685#M52298</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to creat a tabulate table that cill contain all numeric columns (and then another one with the categorical ones).&lt;/P&gt;&lt;P&gt;I tryed running this but it doesn't work.&lt;/P&gt;&lt;P&gt;Any suggestion?&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
	NumericCols = {};
	for(i = 1, i &amp;lt;= N Cols(dt), i++,
		Col = Column(dt,i);
		ColDataType = Col &amp;lt;&amp;lt; Get Data Type; 
		If( ColDataType == "Numeric",
			Insert Into(NumericCols,Col &amp;lt;&amp;lt; Get Name);
			);
		);


Tabulate(	
	Set Format( Uniform Format( 10, 2 ) ),
	Add Table(
		Column Table( Statistics( N ) ),
		Column Table( Statistics( Mean ) ),
		Column Table( Statistics( Std Dev ) ),
		Column Table( Statistics( Min ) ),
		Column Table( Statistics( Max ) ),
		Column Table( Statistics( Median ) ),
		Row Table(
			Analysis Columns(
				NumericCols = {}
			)
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 24 May 2020 17:41:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/268685#M52298</guid>
      <dc:creator>eliyahu100</dc:creator>
      <dc:date>2020-05-24T17:41:44Z</dc:date>
    </item>
    <item>
      <title>Re: Tabulate all numeric columns in a table</title>
      <link>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/268704#M52299</link>
      <description>&lt;P&gt;Here is a rewrite of your code that uses a simpler way to get the numeric column names, and then adds the Eval() function around the list of numeric columns, to make it work&lt;/P&gt;
&lt;P&gt;.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tab.PNG" style="width: 443px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/24153i00A7355CCA614D3C/image-size/large?v=v2&amp;amp;px=999" role="button" title="tab.PNG" alt="tab.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
NumericCols = dt &amp;lt;&amp;lt; get column names( numeric );

dt &amp;lt;&amp;lt; Tabulate(
	Set Format( Uniform Format( 10, 2 ) ),
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Statistics( N ) ),
		Column Table( Statistics( Mean, Std Dev ) ),
		Column Table( Statistics( Min, Max ) ),
		Column Table( Statistics( Median ) ),
		Row Table( Analysis Columns( Eval( Numericcols ) ) )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 May 2020 18:22:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/268704#M52299</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-05-24T18:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Tabulate all numeric columns in a table</title>
      <link>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/268730#M52300</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;I see now that the syntax of a categorical column is totaly different.&lt;/P&gt;&lt;P&gt;How would you do this if you want a tabulate table with the following:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Set Format( Name( "% of Total" )(9, 0) ),
	Add Table(
		Column Table( Statistics( N, Name( "% of Total" ) ) ),&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 24 May 2020 19:30:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/268730#M52300</guid>
      <dc:creator>eliyahu100</dc:creator>
      <dc:date>2020-05-24T19:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Tabulate all numeric columns in a table</title>
      <link>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/268740#M52301</link>
      <description>&lt;P&gt;The Tabulate syntax is &lt;STRONG&gt;NOT&amp;nbsp;&lt;/STRONG&gt;totally different, in fact it is identical except for the&amp;nbsp; words "Analysis Columns" changed to "Grouping Columns". &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
CharacterCols = dt &amp;lt;&amp;lt; get column names( Character );

dt &amp;lt;&amp;lt; Tabulate(
	Set Format( Name( "% of Total" )(9, 0) ),
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Statistics( N, Name( "% of Total" ) ) ),
		Row Table( Grouping Columns( eval( CharacterCols ) ) )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I would like to know, what made you think the syntax was drastically different?&amp;nbsp; I am assuming that you are interactively running a sample Tabulate for the Analysis Columns, and then having JMP provide you with the JSL for the sample you ran, and then repeating the same for the Character Columns.&amp;nbsp; That would have shown you almost identical JSL.&amp;nbsp; I would like to help you figure out, what brought you to the conclusion you made, so I can help you make creating scripts as easy as possible.&lt;/P&gt;
&lt;P&gt;Oh....and you need to read the Scripting Guide.....there is no substitute for reading it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; Help==&amp;gt;JMP Documentation Library...……..Scripting Guide&lt;/P&gt;</description>
      <pubDate>Sun, 24 May 2020 20:37:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/268740#M52301</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-05-24T20:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Tabulate all numeric columns in a table</title>
      <link>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/268741#M52302</link>
      <description>&lt;P&gt;Thanks for the reply, but the code you posted does not provide me with the table i need.&lt;/P&gt;&lt;P&gt;here is the code, for the data file examole you used, which would give me the table i need.&lt;/P&gt;&lt;P&gt;You will note the output is different.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Tabulate(
	Add Table(
		Column Table( Statistics( N, Name( "% of Total" ) ) ),
		Row Table( Grouping Columns( :lot_id ) ),
		Row Table( Grouping Columns( :wafer ) ),
		Row Table( Grouping Columns( :Wafer ID in lot ID ) ),
		Row Table( Grouping Columns( :SITE ) )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The reason I assumed there is a difference is since here each row table is stated seperately, but for in the numerical data they were all under the same&lt;/P&gt;&lt;P&gt;"Row Table(Analysis Columns("&lt;/P&gt;&lt;P&gt;and then a list of the column names seperated by a comma.&lt;/P&gt;&lt;P&gt;This led me to think that for the numbers I could use a simple list but not for the charecter.&lt;/P&gt;&lt;P&gt;Thanks for the reference to the&amp;nbsp;&lt;SPAN&gt;Scripting Guide I defenetly should&amp;nbsp;find the time to study it!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 24 May 2020 21:43:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/268741#M52302</guid>
      <dc:creator>eliyahu100</dc:creator>
      <dc:date>2020-05-24T21:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Tabulate all numeric columns in a table</title>
      <link>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/268746#M52303</link>
      <description>&lt;P&gt;The problem is not with the Tabulate code.&amp;nbsp; The Tabulate code I provided you will work just fine.&amp;nbsp; The issue is with the setting of the columns to be in the tabulate.&amp;nbsp; In the last code that I sent you, the statement&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;CharacterCols = dt &amp;lt;&amp;lt; get column names( character );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;put into the CharacterCols list, all of the columns from the data table that were of Data Type Character.&amp;nbsp; And the Tabulate ran correctly with the columns Lot_id, Wafer ID in Lot ID.&amp;nbsp; Those are the only 2 columns in the data table that are of Character Data Type.&amp;nbsp; It was my misunderstanding that your request for Classification variables being included in the second Tabulate, meant, Character columns.&amp;nbsp; But with your correction that Classification needs to include Wafer and Site in the Tabulate, requires that the CharacterCols list of columns needs to be generated differently.&amp;nbsp; What will cover all of the columns that you want, is to load that list with all of the columns with the modeling type of "Nominal".&amp;nbsp; Therefore, a simple change of the statement to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;CharacterCols = dt &amp;lt;&amp;lt; get column names( nominal );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Will place into the CharacterCols list, &amp;nbsp;&lt;FONT style="background-color: #ffffff;"&gt;{lot_id, wafer, Wafer ID in lot ID, SITE};&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT style="background-color: #ffffff;"&gt;The modified JSL is below&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
CharacterCols = dt &amp;lt;&amp;lt; get column names( nominal );


dt &amp;lt;&amp;lt; Tabulate(
	Set Format( Name( "% of Total" )(9, 0) ),
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Statistics( N, Name( "% of Total" ) ) ),
		Row Table( Grouping Columns( eval( CharacterCols ) ) )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 24 May 2020 22:42:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/268746#M52303</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-05-24T22:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: Tabulate all numeric columns in a table</title>
      <link>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/268792#M52311</link>
      <description>&lt;P&gt;Thanks again for bearing in with me. The second code you sent still does not give the results I need.&lt;/P&gt;&lt;P&gt;Please see below the results I am trying to get which is the outcome of the code i posted in previous post, followed by the results I get from your code.&lt;/P&gt;&lt;P&gt;This is what I would like to get:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eliyahu100_0-1590404560746.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/24157i746A9F801D122E45/image-size/large?v=v2&amp;amp;px=999" role="button" title="eliyahu100_0-1590404560746.png" alt="eliyahu100_0-1590404560746.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is what I get using the code posted:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eliyahu100_2-1590405214360.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/24159i23C286D2D3A57A55/image-size/large?v=v2&amp;amp;px=999" role="button" title="eliyahu100_2-1590405214360.png" alt="eliyahu100_2-1590405214360.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 11:18:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/268792#M52311</guid>
      <dc:creator>eliyahu100</dc:creator>
      <dc:date>2020-05-25T11:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Tabulate all numeric columns in a table</title>
      <link>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/268796#M52312</link>
      <description>&lt;P&gt;Here is one method to do what you want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
CharacterCols = dt &amp;lt;&amp;lt; get column names( nominal );

// Build a string variable that contains the required JSL
theExpr = 
"dt &amp;lt;&amp;lt; Tabulate(
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Statistics( N, Name( \!"% of Total\!" ) ) ),";
		For( i = 1, i &amp;lt;= N Items( CharacterCols ), i++,
		theExpr = theExpr ||
			"Row Table( Grouping Columns( " || char(CharacterCols[i]) || ") ),";
		);
	theExpr = theExpr || "));";
// Execute the JSL
eval(parse(theExpr));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Other Community members may have a better method&lt;/P&gt;</description>
      <pubDate>Mon, 25 May 2020 11:47:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/268796#M52312</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-05-25T11:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Tabulate all numeric columns in a table</title>
      <link>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/269059#M52369</link>
      <description>&lt;P&gt;PS.&lt;/P&gt;&lt;P&gt;I rewrote this code to work on&amp;nbsp;continuous columns instead of numeric. This&amp;nbsp;suits my needs better, since I have several columns which are in fact nominal but have numerical data and Value labels.&lt;/P&gt;&lt;P&gt;Here is the final code I used.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = currentdatatable();
continuousCols /*NumericCols */ = dt &amp;lt;&amp;lt; get column names( continuous /*numeric*/  );

dt &amp;lt;&amp;lt; Tabulate(
	Set Format( Uniform Format( 10, 2 ) ),
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Statistics( N ) ),
		Column Table( Statistics( Mean, Std Dev ) ),
		Column Table( Statistics( Min, Max ) ),
		Column Table( Statistics( Median ) ),
		Row Table( Analysis Columns( Eval( continuousCols /*NumericCols */ ) ) )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks a lot for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 09:29:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/269059#M52369</guid>
      <dc:creator>eliyahu100</dc:creator>
      <dc:date>2020-05-27T09:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Tabulate all numeric columns in a table</title>
      <link>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/752462#M93395</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Here is how I would do it&lt;BR /&gt;&lt;BR /&gt;Names Default To Here( 1 );
dt = Current Data Table();
continuousCols/*NumericCols */ = dt &amp;lt;&amp;lt; get column names( continuous/*numeric*/  );
exCols = dt &amp;lt;&amp;lt; Get Excluded Columns(string);

For( i = Length( continuousCols ), i &amp;gt;= 1, i--,
	If( Contains( exCols, char(continuousCols[i]) ),
		Remove From( continuousCols, i, 1 )
	)
);

dt &amp;lt;&amp;lt; Tabulate(
	Set Format( Uniform Format( 10, 2 ) ),
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Statistics( N ) ),
		Column Table( Statistics( Mean, Std Dev ) ),
		Column Table( Statistics( Min, Max ) ),
		Column Table( Statistics( Median ) ),
		Row Table( Analysis Columns( Eval( continuousCols/*NumericCols */ ) ) )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 May 2024 21:52:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/752462#M93395</guid>
      <dc:creator>eliyahu100</dc:creator>
      <dc:date>2024-05-06T21:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Tabulate all numeric columns in a table</title>
      <link>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/752504#M93397</link>
      <description>&lt;P&gt;By mistake, I edited the above question and changed the question to my response.&amp;nbsp;&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/7188"&gt;@eliyahu100&lt;/a&gt;&amp;nbsp; I apologize for my mistake.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 21:55:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Tabulate-all-numeric-columns-in-a-table/m-p/752504#M93397</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-05-06T21:55:23Z</dc:date>
    </item>
  </channel>
</rss>

