<?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: Creating formulas in a new column. JMP script in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Creating-formulas-in-a-new-column-JMP-script/m-p/399556#M65048</link>
    <description>&lt;P&gt;One addition to what Brady^2 said: you can create formula columns in any platform using this method:&lt;BR /&gt;&lt;A title="Creating formula columns on the fly" href="https://www.jmp.com/support/help/en/16.0/#page/jmp/transform-columns-in-a-jmp-platform.shtml" target="_blank" rel="noopener"&gt;https://www.jmp.com/support/help/en/16.0/#page/jmp/transform-columns-in-a-jmp-platform.shtml&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used to create a lot of formula columns in data tables. I now do less of that, and use the method above a lot.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jul 2021 13:24:03 GMT</pubDate>
    <dc:creator>markschahl</dc:creator>
    <dc:date>2021-07-08T13:24:03Z</dc:date>
    <item>
      <title>Creating formulas in a new column. JMP script</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-formulas-in-a-new-column-JMP-script/m-p/399400#M65025</link>
      <description>&lt;P&gt;Hello all. I am needing to create a new column that will subtract the contents of consecutive rows and insert that value into the new column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essentially I want to say: In column X, subtract row 1 from row 2 and place that value in column Y. I want this to continue for the entirety of Column X.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Therefore: Column Y = X(i+1) - Xi; i being the row number. Anyone know how to do this? Seems simple enough but I am very new to scripting and having a hard time getting something to stick.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:33:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-formulas-in-a-new-column-JMP-script/m-p/399400#M65025</guid>
      <dc:creator>handerson89</dc:creator>
      <dc:date>2023-06-10T23:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Creating formulas in a new column. JMP script</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-formulas-in-a-new-column-JMP-script/m-p/399436#M65029</link>
      <description>&lt;OL&gt;
&lt;LI&gt;You need to read the Discovering JMP document, and the Scripting Guide!&lt;/LI&gt;
&lt;LI&gt;You need to attempt to solve the problem first.&amp;nbsp; One learns by making mistakes and figuring out what the problem is&lt;/LI&gt;
&lt;LI&gt;When you fail at solving the problem, the Discussion Community is there to help.&lt;/LI&gt;
&lt;LI&gt;Below is a script that if you have setup your data table correctly, should show you one way to solve the problem
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

// Open Data Table: big class.jmp
// → Data Table( "big class" )
Open( "$SAMPLE_DATA/big class.jmp" );

// New column: Column 6
Data Table( "big class" ) &amp;lt;&amp;lt; New Column( "New Column",
	Numeric,
	"Continuous",
	Format( "Best", 12 ),
	Formula( :weight[Row() + 1] - :weight )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Wed, 07 Jul 2021 19:43:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-formulas-in-a-new-column-JMP-script/m-p/399436#M65029</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-07-07T19:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Creating formulas in a new column. JMP script</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-formulas-in-a-new-column-JMP-script/m-p/399449#M65031</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As Jim mentions, studying up will help, although admittedly the sheer volume of information can be a bit intimidating at first.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since much of what can be accomplished through scripting can also be done interactively, be sure to check out 1-click formulas, which easily create some of the most commonly encountered formulas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your example, you can right-click on any value in the original column and select &lt;STRONG&gt;New Formula Column &amp;gt; Row &amp;gt; Difference&lt;/STRONG&gt; from the ensuing menu. This creates a new column with the desired formula, in a single step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Brady&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="brady_brady_0-1625687612364.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/34025i5057C39623F5CF0B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="brady_brady_0-1625687612364.png" alt="brady_brady_0-1625687612364.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 19:59:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-formulas-in-a-new-column-JMP-script/m-p/399449#M65031</guid>
      <dc:creator>brady_brady</dc:creator>
      <dc:date>2021-07-07T19:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Creating formulas in a new column. JMP script</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-formulas-in-a-new-column-JMP-script/m-p/399556#M65048</link>
      <description>&lt;P&gt;One addition to what Brady^2 said: you can create formula columns in any platform using this method:&lt;BR /&gt;&lt;A title="Creating formula columns on the fly" href="https://www.jmp.com/support/help/en/16.0/#page/jmp/transform-columns-in-a-jmp-platform.shtml" target="_blank" rel="noopener"&gt;https://www.jmp.com/support/help/en/16.0/#page/jmp/transform-columns-in-a-jmp-platform.shtml&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used to create a lot of formula columns in data tables. I now do less of that, and use the method above a lot.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 13:24:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-formulas-in-a-new-column-JMP-script/m-p/399556#M65048</guid>
      <dc:creator>markschahl</dc:creator>
      <dc:date>2021-07-08T13:24:03Z</dc:date>
    </item>
  </channel>
</rss>

