<?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 Re: JMP script: How to create summary of a bunch of cols without specifying column names? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JMP-script-How-to-create-summary-of-a-bunch-of-cols-without/m-p/35256#M20812</link>
    <description>&lt;P&gt;If I understand you correctly, maybe this will work. All strictly based on Column position.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, suppose you have a table where the columns of interest are at specified positions (colPos). Then....&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;statVect = [];
colPos = [1, 2, 8, 9, 14, 31, 32, 33, 36, 37, 38, 44, 49, 54, 55, 58, 59, 60, 61, 63, 69, 70,
72, 73, 79, 82, 85, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
102, 104, 105, 107, 112, 113, 115, 116, 117, 126, 132, 134, 136, 145, 149, 152, 154,
155, 156, 157, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 177];

meanExpr = Expr( Mean() );

For( i=1, i&amp;lt;= NRow( colPos ), i++,
	Eval(EvalExpr( InsertInto( meanExpr, NameExpr( Column( Expr(colPos[i]) )[] )  ) ));
);

For Each Row( statVect |/= meanExpr );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;statVect will contain the result of Mean( Column(1), Column(2), Column(8), Column(9), ...., Column(177) ) for each row in the table.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2017 07:27:06 GMT</pubDate>
    <dc:creator>Phil_Brown</dc:creator>
    <dc:date>2017-02-03T07:27:06Z</dc:date>
    <item>
      <title>JMP script: How to create summary of a bunch of cols without specifying column names?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-script-How-to-create-summary-of-a-bunch-of-cols-without/m-p/35254#M20810</link>
      <description>&lt;P&gt;I'm looking to create a script which performs a series of steps, first of which is to create an N-statistic summary of an unspecified number of columns with unspecified names. The guides I've seen so far on jmp scripted summary tables require the column names to be specified.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can specify the group, e.g. Group(:Column1), but I want all other columns from column2 onwards to have an N-summary created without having to specify their names.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any ideas?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 02:36:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-script-How-to-create-summary-of-a-bunch-of-cols-without/m-p/35254#M20810</guid>
      <dc:creator>32103940</dc:creator>
      <dc:date>2017-02-03T02:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: JMP script: How to create summary of a bunch of cols without specifying column names?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-script-How-to-create-summary-of-a-bunch-of-cols-without/m-p/35256#M20812</link>
      <description>&lt;P&gt;If I understand you correctly, maybe this will work. All strictly based on Column position.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, suppose you have a table where the columns of interest are at specified positions (colPos). Then....&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;statVect = [];
colPos = [1, 2, 8, 9, 14, 31, 32, 33, 36, 37, 38, 44, 49, 54, 55, 58, 59, 60, 61, 63, 69, 70,
72, 73, 79, 82, 85, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
102, 104, 105, 107, 112, 113, 115, 116, 117, 126, 132, 134, 136, 145, 149, 152, 154,
155, 156, 157, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 177];

meanExpr = Expr( Mean() );

For( i=1, i&amp;lt;= NRow( colPos ), i++,
	Eval(EvalExpr( InsertInto( meanExpr, NameExpr( Column( Expr(colPos[i]) )[] )  ) ));
);

For Each Row( statVect |/= meanExpr );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;statVect will contain the result of Mean( Column(1), Column(2), Column(8), Column(9), ...., Column(177) ) for each row in the table.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 07:27:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-script-How-to-create-summary-of-a-bunch-of-cols-without/m-p/35256#M20812</guid>
      <dc:creator>Phil_Brown</dc:creator>
      <dc:date>2017-02-03T07:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: JMP script: How to create summary of a bunch of cols without specifying column names?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-script-How-to-create-summary-of-a-bunch-of-cols-without/m-p/35398#M20892</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe you can try this approach:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

colname = dt &amp;lt;&amp;lt; get column names( string );

dts = dt &amp;lt;&amp;lt; Summary( N( Eval( colname ) ), Freq( "None" ), Weight( "None" ) );

colname2 = dts &amp;lt;&amp;lt; get column names( string );

dts &amp;lt;&amp;lt; Delete Columns( {colname2[1], colname2[2]} );  // delete N Rows &amp;amp; N(1st col in original data) columns&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Since you only wish to include other columns starting from column 2 onwards, I've added the last row of codes so that you can delete any rows before the 2nd column in your original data without even have to specify their names.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps! :)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Val&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 03:41:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-script-How-to-create-summary-of-a-bunch-of-cols-without/m-p/35398#M20892</guid>
      <dc:creator>ValarieSimmons</dc:creator>
      <dc:date>2017-02-07T03:41:28Z</dc:date>
    </item>
  </channel>
</rss>

