<?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: JSL:Difference between 2 columns in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-Difference-between-2-columns/m-p/35299#M20829</link>
    <description>&lt;P&gt;Assuming that you actually have a data column named&amp;nbsp;&lt;SPAN&gt;A||cyclecountvalue1, then this should work: Name( "A||cyclecountvalue1" ) instead. The problem is that the original column name is not a valid JSL name, but the Name() function will return a valid reference that you can use instead.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2017 21:12:03 GMT</pubDate>
    <dc:creator>Mark_Bailey</dc:creator>
    <dc:date>2017-02-03T21:12:03Z</dc:date>
    <item>
      <title>JSL:Difference between 2 columns</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Difference-between-2-columns/m-p/35297#M20827</link>
      <description>&lt;P&gt;What if I have 2 columns with column names based on the input of data and I need to subtract them and store it in a column?&lt;/P&gt;&lt;P&gt;It's simple with the column name A and B and you can calculate A-B.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the column name A||cyclecountvalue1 and B||cyclecountvalue2 , it gives me an error saying name unresolved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Should I use associative array or complex function?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really appreciate your help.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 21:04:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Difference-between-2-columns/m-p/35297#M20827</guid>
      <dc:creator>vishwasanj</dc:creator>
      <dc:date>2017-02-03T21:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: JSL:Difference between 2 columns</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Difference-between-2-columns/m-p/35299#M20829</link>
      <description>&lt;P&gt;Assuming that you actually have a data column named&amp;nbsp;&lt;SPAN&gt;A||cyclecountvalue1, then this should work: Name( "A||cyclecountvalue1" ) instead. The problem is that the original column name is not a valid JSL name, but the Name() function will return a valid reference that you can use instead.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 21:12:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Difference-between-2-columns/m-p/35299#M20829</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2017-02-03T21:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: JSL:Difference between 2 columns</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Difference-between-2-columns/m-p/35304#M20832</link>
      <description>cyclecount value keeps changing according to the input of the data. I don't think I can put it under the " ".&lt;BR /&gt;&lt;BR /&gt;New Column( "Delta_1_"||Char(currentcycle3),&lt;BR /&gt;Numeric,&lt;BR /&gt;Formula( :Data of stack_precyc - :Data of stack_||Char(currentcycle3) )//This does not work&lt;BR /&gt;&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;Maybe I can loop through the column one by one for both the columns till the end of the rows and calculate the difference. Can anyone help with the syntax?&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;</description>
      <pubDate>Fri, 03 Feb 2017 21:35:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Difference-between-2-columns/m-p/35304#M20832</guid>
      <dc:creator>vishwasanj</dc:creator>
      <dc:date>2017-02-03T21:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: JSL:Difference between 2 columns</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Difference-between-2-columns/m-p/35307#M20833</link>
      <description>&lt;P&gt;I don't recommend using formulas unless the contents of a column must automatically update in the future, after the script is finished.&lt;/P&gt;
&lt;P&gt;You could iterate over the rows with For Each Row() function but it would be messier, I think. Instead, vectorize the problem. &lt;/P&gt;
&lt;P&gt;You can use this pattern:&lt;/P&gt;
&lt;P&gt;data 1 = data column 1 &amp;lt;&amp;lt; Get As Matrix;&lt;/P&gt;
&lt;P&gt;data 2 = data column 2 &amp;lt;&amp;lt; Get As Matrix;&lt;/P&gt;
&lt;P&gt;Current Data Table() &amp;lt;&amp;lt; New Column( "name", Values( data 1 - data 2 ) );&lt;/P&gt;
&lt;P&gt;Of course you would iterate over all possible pairs of columns.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 21:58:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Difference-between-2-columns/m-p/35307#M20833</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2017-02-03T21:58:53Z</dc:date>
    </item>
  </channel>
</rss>

