<?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: How can i subtract row values in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-can-i-subtract-row-values/m-p/69570#M35115</link>
    <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/10894"&gt;@powerpuff&lt;/a&gt;,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table(); 

Mat = dt &amp;lt;&amp;lt; Get As Matrix; 

Res = Mat[1,0] - Mat[2,0]; 

MatFinal = V Concat(Mat,Res); 

dt_New = As Table(MatFinal);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 24 Aug 2018 17:51:06 GMT</pubDate>
    <dc:creator>uday_guntupalli</dc:creator>
    <dc:date>2018-08-24T17:51:06Z</dc:date>
    <item>
      <title>How can i subtract row values</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-i-subtract-row-values/m-p/69568#M35113</link>
      <description>&lt;P&gt;How can I subtract values of R1 from R2 and add the answer to the Difference row?&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="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/12162iBA2F663023AA1BFD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 17:18:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-i-subtract-row-values/m-p/69568#M35113</guid>
      <dc:creator>powerpuff</dc:creator>
      <dc:date>2018-08-24T17:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: How can i subtract row values</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-i-subtract-row-values/m-p/69570#M35115</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/10894"&gt;@powerpuff&lt;/a&gt;,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table(); 

Mat = dt &amp;lt;&amp;lt; Get As Matrix; 

Res = Mat[1,0] - Mat[2,0]; 

MatFinal = V Concat(Mat,Res); 

dt_New = As Table(MatFinal);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Aug 2018 17:51:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-i-subtract-row-values/m-p/69570#M35115</guid>
      <dc:creator>uday_guntupalli</dc:creator>
      <dc:date>2018-08-24T17:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: How can i subtract row values</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-i-subtract-row-values/m-p/69634#M35127</link>
      <description>&lt;P&gt;Here is a simple script that will do what you are asking&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

// Create a sample data table
dt = New Table( "Untitled 4",
	Add Rows( 3 ),
	New Column( "Label",
		Character,
		"Nominal",
		Set Values( {"#1", "#2", "Difference"} )
	),
	New Column( "A",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [5, 6, .] ),
		Set Display Width( 43 )
	),
	New Column( "B",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [9, 7, .] )
	),
	New Column( "C",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [12, 4, .] ),
		Set Display Width( 43 )
	)
);

// Here is the code to subtract the values
For( i = 2, i &amp;lt;= N Cols( dt ), i++,
	Column( dt, i )[3] = Column( dt, i )[1] - Column( dt, i )[2]
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 25 Aug 2018 01:04:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-i-subtract-row-values/m-p/69634#M35127</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-08-25T01:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: How can i subtract row values</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-i-subtract-row-values/m-p/70005#M35139</link>
      <description>&lt;P&gt;The key to what you are asking is to remember that a JMP data table is NOT a spreadsheet. &amp;nbsp;What I would suggest is to transpose your data table and then add a new column of differences. &amp;nbsp;Then you are set to analyze the difference by the groups that you currently have in columns. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Table &amp;gt; Transpose&lt;/P&gt;
&lt;P&gt;2. Select your label column as the "Label" and select all other columns and click "Transposne Columns" and click ok.&lt;/P&gt;
&lt;P&gt;Now &amp;nbsp;you have a new table with a column of labels for your "groups" (what were your columns) and two colums of data, one for R1 and one for R2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. From this new table higlight the two R columns, right click, select New Formula Column &amp;gt; Combine &amp;gt; Difference.&lt;/P&gt;
&lt;P&gt;Now you have column of differences and you can analyze how the differences differ across your groups (i.e., use graph builder with the group lables as the x and the differences as the y).&lt;/P&gt;</description>
      <pubDate>Sun, 26 Aug 2018 23:26:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-i-subtract-row-values/m-p/70005#M35139</guid>
      <dc:creator>KarenC</dc:creator>
      <dc:date>2018-08-26T23:26:25Z</dc:date>
    </item>
  </channel>
</rss>

