<?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 a column based on max values of row in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Creating-a-column-based-on-max-values-of-row/m-p/315294#M16612</link>
    <description>&lt;P&gt;Please show what the result for your example data would look like as there are several ways to interpret your request and some are quite a bit more obnoxious to accomplish then others. Also, depending on the exact "other computations" the approach that works for Min and Max may not work.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Nov 2016 17:54:05 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-11-29T17:54:05Z</dc:date>
    <item>
      <title>Creating a column based on max values of row</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Creating-a-column-based-on-max-values-of-row/m-p/315244#M16608</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I need help with calculating the max of a column for every 10 rows. &amp;nbsp;Here is the example of data&lt;/P&gt;&lt;P&gt;I am stuck with this, I appreciate any help&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Data Group&lt;BR /&gt;65.36574767 5&lt;BR /&gt;69.07862909 2&lt;BR /&gt;63.25081767 8&lt;BR /&gt;69.07863052 1&lt;BR /&gt;66.88025195 3&lt;BR /&gt;64.26943767 9&lt;BR /&gt;64.62144481 6&lt;BR /&gt;63.38701767 7&lt;BR /&gt;63.63735481 4&lt;BR /&gt;63.48772767 10&lt;BR /&gt;65.3728169 5&lt;BR /&gt;69.85877404 2&lt;BR /&gt;65.26442976 8&lt;BR /&gt;66.87676547 1&lt;BR /&gt;67.33332404 3&lt;BR /&gt;64.85199404 9&lt;BR /&gt;65.58766547 6&lt;BR /&gt;64.8385669 7&lt;BR /&gt;64.3282969 4&lt;BR /&gt;63.91490118 10&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 16:50:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Creating-a-column-based-on-max-values-of-row/m-p/315244#M16608</guid>
      <dc:creator>Catalina1972</dc:creator>
      <dc:date>2016-11-29T16:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a column based on max values of row</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Creating-a-column-based-on-max-values-of-row/m-p/315254#M16609</link>
      <description>&lt;P&gt;What do you want as the output?&amp;nbsp; A report (what should it look like)?&amp;nbsp; A SAS data set with the same number of observations, but MAX_10 attached as a third variable?&amp;nbsp; A SAS data set with one observation for each original 10 observations?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you 100% sure that you always have all 10 GROUP values every time?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 17:01:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Creating-a-column-based-on-max-values-of-row/m-p/315254#M16609</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-11-29T17:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a column based on max values of row</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Creating-a-column-based-on-max-values-of-row/m-p/315292#M16611</link>
      <description>&lt;P&gt;Thank you, I need to create another column in the initial data set that will calculate min/max and some other computations. &amp;nbsp;I will always have 10 group values as I am meassuring 10 &amp;nbsp;same locations each time&lt;/P&gt;&lt;P&gt;Catalina&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 17:45:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Creating-a-column-based-on-max-values-of-row/m-p/315292#M16611</guid>
      <dc:creator>Catalina1972</dc:creator>
      <dc:date>2016-11-29T17:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a column based on max values of row</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Creating-a-column-based-on-max-values-of-row/m-p/315294#M16612</link>
      <description>&lt;P&gt;Please show what the result for your example data would look like as there are several ways to interpret your request and some are quite a bit more obnoxious to accomplish then others. Also, depending on the exact "other computations" the approach that works for Min and Max may not work.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 17:54:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Creating-a-column-based-on-max-values-of-row/m-p/315294#M16612</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-11-29T17:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a column based on max values of row</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Creating-a-column-based-on-max-values-of-row/m-p/315296#M16613</link>
      <description>Here is the data. I have Max-Min but I need columns for Max and Min&lt;BR /&gt;individually. The tools spits Max-Min...&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Tue, 29 Nov 2016 17:58:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Creating-a-column-based-on-max-values-of-row/m-p/315296#M16613</guid>
      <dc:creator>Catalina1972</dc:creator>
      <dc:date>2016-11-29T17:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a column based on max values of row</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Creating-a-column-based-on-max-values-of-row/m-p/315298#M16614</link>
      <description>&lt;P&gt;here is the data set&amp;nbsp;&lt;/P&gt;&lt;P&gt;Height Average Max-Min Pillar&lt;BR /&gt;65.36574767 65.30570595 5.827812857 5&lt;BR /&gt;69.07862909 2&lt;BR /&gt;63.25081767 8&lt;BR /&gt;69.07863052 1&lt;BR /&gt;66.88025195 3&lt;BR /&gt;64.26943767 9&lt;BR /&gt;64.62144481 6&lt;BR /&gt;63.38701767 7&lt;BR /&gt;63.63735481 4&lt;BR /&gt;63.48772767 10&lt;BR /&gt;65.3728169 65.82275347 5.943872857 5&lt;BR /&gt;69.85877404 2&lt;BR /&gt;65.26442976 8&lt;BR /&gt;66.87676547 1&lt;BR /&gt;67.33332404 3&lt;BR /&gt;64.85199404 9&lt;BR /&gt;65.58766547 6&lt;BR /&gt;64.8385669 7&lt;BR /&gt;64.3282969 4&lt;BR /&gt;63.91490118 10&lt;BR /&gt;64.81566355 66.16816555 7.866974286 5&lt;BR /&gt;71.0156307 2&lt;BR /&gt;63.81814355 8&lt;BR /&gt;71.55371498 1&lt;BR /&gt;68.77600784 3&lt;BR /&gt;65.16479498 9&lt;BR /&gt;65.11012355 6&lt;BR /&gt;63.82965355 7&lt;BR /&gt;63.91118213 4&lt;BR /&gt;63.6867407 10&lt;BR /&gt;64.82539697 65.94098597 9.509042857 5&lt;BR /&gt;71.13182554 2&lt;BR /&gt;64.52901554 8&lt;BR /&gt;72.4554584 1&lt;BR /&gt;68.01074125 3&lt;BR /&gt;64.08588697 9&lt;BR /&gt;64.78415125 6&lt;BR /&gt;63.24279125 7&lt;BR /&gt;62.94641554 4&lt;BR /&gt;63.39817697 10&lt;BR /&gt;65.77032324 66.77302331 10.25718357 5&lt;BR /&gt;71.78037895 2&lt;BR /&gt;64.82555895 8&lt;BR /&gt;74.40845824 1&lt;BR /&gt;67.35196895 3&lt;BR /&gt;65.42502895 9&lt;BR /&gt;65.48257895 6&lt;BR /&gt;64.24718895 7&lt;BR /&gt;64.15127467 4&lt;BR /&gt;64.28747324 10&lt;BR /&gt;65.32768603 66.08724017 8.084702857 5&lt;BR /&gt;70.31432317 2&lt;BR /&gt;64.94306746 8&lt;BR /&gt;71.55355031 1&lt;BR /&gt;67.05512174 3&lt;BR /&gt;65.08406174 9&lt;BR /&gt;63.77385746 6&lt;BR /&gt;63.46884746 7&lt;BR /&gt;64.56324317 4&lt;BR /&gt;64.78864317 10&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 18:02:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Creating-a-column-based-on-max-values-of-row/m-p/315298#M16614</guid>
      <dc:creator>Catalina1972</dc:creator>
      <dc:date>2016-11-29T18:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a column based on max values of row</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Creating-a-column-based-on-max-values-of-row/m-p/315305#M16616</link>
      <description>&lt;P&gt;OK, here's one approach:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;do _n_=1 to 10;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; minHeight = min(Height, minHeight);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; maxHeight = max(Height, maxHeight);&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P&gt;do _n_=1 to 10;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; minHeight=.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; maxHeight=.;&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The two lines after the OUTPUT statement are optional.&amp;nbsp; From your description, you only want those variables on the first observation for a group.&amp;nbsp; You could try omitting those two statements, as an experiment.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 18:21:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Creating-a-column-based-on-max-values-of-row/m-p/315305#M16616</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-11-29T18:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a column based on max values of row</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Creating-a-column-based-on-max-values-of-row/m-p/315308#M16617</link>
      <description>Thanks&lt;BR /&gt;works great!&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Tue, 29 Nov 2016 18:41:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Creating-a-column-based-on-max-values-of-row/m-p/315308#M16617</guid>
      <dc:creator>Catalina1972</dc:creator>
      <dc:date>2016-11-29T18:41:09Z</dc:date>
    </item>
  </channel>
</rss>

