<?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: Equations to open in new data table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Equations-to-open-in-new-data-table/m-p/652835#M84254</link>
    <description>&lt;P&gt;Is this what you are talking about.&amp;nbsp; This script creates 2 new columns, each with a different formula:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = 
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );

dt &amp;lt;&amp;lt; New Column( "one", formula( :height + :weight ) );
dt &amp;lt;&amp;lt; New Column( "two", formula( :height / :weight ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1687816089277.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/54175iB0146AB7B22BA9B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1687816089277.png" alt="txnelson_0-1687816089277.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jun 2023 21:48:18 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2023-06-26T21:48:18Z</dc:date>
    <item>
      <title>Equations to open in new data table</title>
      <link>https://community.jmp.com/t5/Discussions/Equations-to-open-in-new-data-table/m-p/652606#M84245</link>
      <description>&lt;P&gt;I need to calculate two separate equations to open in two columns in a new data table. Is there a way to do so?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 16:42:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Equations-to-open-in-new-data-table/m-p/652606#M84245</guid>
      <dc:creator>JMPUser9</dc:creator>
      <dc:date>2023-06-26T16:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Equations to open in new data table</title>
      <link>https://community.jmp.com/t5/Discussions/Equations-to-open-in-new-data-table/m-p/652755#M84253</link>
      <description>&lt;P&gt;Yes, but we'll need more specifics to give a useful answer. What steps do you need to take, and are you looking for a scripting answer, or one that can be accomplished in the GUI?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 21:18:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Equations-to-open-in-new-data-table/m-p/652755#M84253</guid>
      <dc:creator>Jed_Campbell</dc:creator>
      <dc:date>2023-06-26T21:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Equations to open in new data table</title>
      <link>https://community.jmp.com/t5/Discussions/Equations-to-open-in-new-data-table/m-p/652835#M84254</link>
      <description>&lt;P&gt;Is this what you are talking about.&amp;nbsp; This script creates 2 new columns, each with a different formula:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = 
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );

dt &amp;lt;&amp;lt; New Column( "one", formula( :height + :weight ) );
dt &amp;lt;&amp;lt; New Column( "two", formula( :height / :weight ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1687816089277.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/54175iB0146AB7B22BA9B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1687816089277.png" alt="txnelson_0-1687816089277.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 21:48:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Equations-to-open-in-new-data-table/m-p/652835#M84254</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-06-26T21:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Equations to open in new data table</title>
      <link>https://community.jmp.com/t5/Discussions/Equations-to-open-in-new-data-table/m-p/654411#M84361</link>
      <description>&lt;P&gt;Jim, thanks for the feedback. I'm looking to run a script where&lt;/P&gt;&lt;P&gt;select where name is Katie and Tim, then height = 59 + 60&lt;/P&gt;&lt;P&gt;In a new table&lt;/P&gt;&lt;P&gt;Names&amp;nbsp; &amp;nbsp; &amp;nbsp;Height Sum&lt;/P&gt;&lt;P&gt;Katie/Tim&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;119&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then any combinations I specifically call out.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2023 14:25:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Equations-to-open-in-new-data-table/m-p/654411#M84361</guid>
      <dc:creator>JMPUser9</dc:creator>
      <dc:date>2023-06-30T14:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Equations to open in new data table</title>
      <link>https://community.jmp.com/t5/Discussions/Equations-to-open-in-new-data-table/m-p/654455#M84365</link>
      <description>&lt;P&gt;Here is a simple script that provides one solution&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = 
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );

theNames = {"KATIE", "TIM"};
theRows = dt &amp;lt;&amp;lt; get rows where( dt:name == theNames[1] | dt:name == theNames[2] );

If( N Items( theRows ) == 2,
	dt2 = New Table( "Results" );
	dt2 &amp;lt;&amp;lt; add rows( 1 );
	New Column( "Names", character, set each value( theNames[1] || "/" || theNames[2] ) );
	New Column( "Height Sum", set each value( Sum( dt:height[theRows] ) ) );
	Try( dt2 &amp;lt;&amp;lt; delete columns( "Column 1" ) );
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 30 Jun 2023 16:56:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Equations-to-open-in-new-data-table/m-p/654455#M84365</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-06-30T16:56:08Z</dc:date>
    </item>
  </channel>
</rss>

