<?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: Sum specific columns in each row in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Sum-specific-columns-in-each-row/m-p/35695#M21058</link>
    <description>&lt;P&gt;Maybe a missing ] ? &amp;nbsp;This works for me.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=open("$sample_data/big class.jmp");
sum(dt[3,{height,weight,age}]);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Maybe the r variable is uninitialized. Use show(r); to see what it is.&amp;nbsp;Check the JMP log window for messages.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Not sure why you would add these together" style="width: 315px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/5105i0342EEE99544FF58/image-dimensions/315x225?v=v2" width="315" height="225" role="button" title="Jane.png" alt="Not sure why you would add these together" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Not sure why you would add these together&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 12 Feb 2017 23:14:19 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2017-02-12T23:14:19Z</dc:date>
    <item>
      <title>Sum specific columns in each row</title>
      <link>https://community.jmp.com/t5/Discussions/Sum-specific-columns-in-each-row/m-p/35691#M21056</link>
      <description>&lt;P&gt;I would like to sum specific columns in each row.&lt;/P&gt;&lt;P&gt;I can find the maximum value in each row using the below :&lt;/P&gt;&lt;P&gt;location = &amp;nbsp;Loc Max( dt[r, {a,b,c} );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but cannot use the sum&amp;nbsp;&lt;/P&gt;&lt;P&gt;Total = Sum&lt;SPAN&gt;( dt[r, {a,b,c} );&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2017 21:08:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sum-specific-columns-in-each-row/m-p/35691#M21056</guid>
      <dc:creator>DataMojo</dc:creator>
      <dc:date>2017-02-12T21:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sum specific columns in each row</title>
      <link>https://community.jmp.com/t5/Discussions/Sum-specific-columns-in-each-row/m-p/35692#M21057</link>
      <description>&lt;P&gt;Worked around, by hard coding the column names :&lt;/P&gt;&lt;P&gt;For Each Row(&lt;BR /&gt;r = Row();&lt;/P&gt;&lt;P&gt;Column = (:Name( "COL1" )) / (:Name( "COL23" ) + :Name( "&lt;SPAN&gt;COL24&lt;/SPAN&gt;" ) + :Name( "&lt;SPAN&gt;COL25&lt;/SPAN&gt;" )) ;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2017 21:45:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sum-specific-columns-in-each-row/m-p/35692#M21057</guid>
      <dc:creator>DataMojo</dc:creator>
      <dc:date>2017-02-12T21:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sum specific columns in each row</title>
      <link>https://community.jmp.com/t5/Discussions/Sum-specific-columns-in-each-row/m-p/35695#M21058</link>
      <description>&lt;P&gt;Maybe a missing ] ? &amp;nbsp;This works for me.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=open("$sample_data/big class.jmp");
sum(dt[3,{height,weight,age}]);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Maybe the r variable is uninitialized. Use show(r); to see what it is.&amp;nbsp;Check the JMP log window for messages.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Not sure why you would add these together" style="width: 315px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/5105i0342EEE99544FF58/image-dimensions/315x225?v=v2" width="315" height="225" role="button" title="Jane.png" alt="Not sure why you would add these together" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Not sure why you would add these together&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Feb 2017 23:14:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sum-specific-columns-in-each-row/m-p/35695#M21058</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2017-02-12T23:14:19Z</dc:date>
    </item>
  </channel>
</rss>

