<?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: Groups of Data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Groups-of-Data/m-p/236024#M43183</link>
    <description>&lt;P&gt;You should give an example of the data you have and what you want to see.&amp;nbsp; It's not perfectly clear what you are looking for here.&lt;/P&gt;</description>
    <pubDate>Mon, 23 Nov 2015 17:05:03 GMT</pubDate>
    <dc:creator>Steelers_In_DC</dc:creator>
    <dc:date>2015-11-23T17:05:03Z</dc:date>
    <item>
      <title>Groups of Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Groups-of-Data/m-p/236015#M43178</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need a way to show just like the freq procedure the table below:&lt;/P&gt;
&lt;P&gt;ID VALUE&lt;/P&gt;
&lt;P&gt;1 &amp;nbsp; 10&lt;/P&gt;
&lt;P&gt;2 &amp;nbsp; 10&lt;/P&gt;
&lt;P&gt;3 &amp;nbsp; 10&lt;/P&gt;
&lt;P&gt;4 &amp;nbsp; 30&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to establish, if value is lower than 20 then it will represent a percentage, and so on.&lt;/P&gt;
&lt;P&gt;I know there is a proc step to do this, i don't remember the name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You guys have any idea ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2015 16:32:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Groups-of-Data/m-p/236015#M43178</guid>
      <dc:creator>DartRodrigo</dc:creator>
      <dc:date>2015-11-23T16:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Groups of Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Groups-of-Data/m-p/236020#M43181</link>
      <description>&lt;P&gt;create a format using proc format and then use it in proc freq.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2015 16:53:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Groups-of-Data/m-p/236020#M43181</guid>
      <dc:creator>ndp</dc:creator>
      <dc:date>2015-11-23T16:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Groups of Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Groups-of-Data/m-p/236024#M43183</link>
      <description>&lt;P&gt;You should give an example of the data you have and what you want to see.&amp;nbsp; It's not perfectly clear what you are looking for here.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2015 17:05:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Groups-of-Data/m-p/236024#M43183</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2015-11-23T17:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Groups of Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Groups-of-Data/m-p/236026#M43185</link>
      <description>&lt;P&gt;Actualy i need the proc step.&lt;/P&gt;
&lt;P&gt;What i need is, establish tracks, just like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if the value is lower than 10 then&amp;nbsp;all values that are lower then 10 are in this group&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if the value is lower than 20 then&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;all values that are lower then 20 are in this group&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if the value is lower than 30 then&amp;nbsp;&lt;SPAN&gt;all values that are lower then 30 are in this group&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think there is a way to do this with proc tabulate but i don't remember how.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2015 17:06:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Groups-of-Data/m-p/236026#M43185</guid>
      <dc:creator>DartRodrigo</dc:creator>
      <dc:date>2015-11-23T17:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Groups of Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Groups-of-Data/m-p/236031#M43188</link>
      <description>&lt;P&gt;You can either write it out using if - then or use proc format:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have;&lt;BR /&gt;input ID VALUE;&lt;BR /&gt;cards;&lt;BR /&gt;1&amp;nbsp;&amp;nbsp; 10&lt;BR /&gt;2&amp;nbsp;&amp;nbsp; 15&lt;BR /&gt;3&amp;nbsp;&amp;nbsp; 20&lt;BR /&gt;4&amp;nbsp;&amp;nbsp; 30&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;proc format;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;value new low-10 = 1&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11-19&amp;nbsp; = 2&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; 20-29&amp;nbsp; = 3&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; 30-high= 4;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;if value &amp;lt; 11 then group = 1;&lt;BR /&gt;if 11 &amp;lt;= value &amp;lt; 20 then group = 2;&lt;BR /&gt;if 20 &amp;lt;= value &amp;lt; 30 then group = 3;&lt;BR /&gt;if value &amp;gt;= 30 then group = 4;&lt;BR /&gt;new_var = value;&lt;BR /&gt;format new_var new.;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2015 17:18:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Groups-of-Data/m-p/236031#M43188</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2015-11-23T17:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Groups of Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Groups-of-Data/m-p/236033#M43190</link>
      <description>&lt;P&gt;here is what i was talking about but there are plenty of other ways. You can adjust as per your needs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input ID VALUE;
datalines;
1   10
2   20
3   10
4   30
run;

proc format;
	value grp low - 10 = '1'
			  10 &amp;lt;- 20 = '2'
			  20 &amp;lt;- high = '3'
	;
run;	

proc freq data=test;
	tables value;
	format value grp.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2015 17:22:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Groups-of-Data/m-p/236033#M43190</guid>
      <dc:creator>ndp</dc:creator>
      <dc:date>2015-11-23T17:22:13Z</dc:date>
    </item>
  </channel>
</rss>

