<?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: Group rows that are duplicated in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Group-rows-that-are-duplicated/m-p/191947#M266170</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp; Milenko,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UCLA operates a great site for individuals wanting to learn SAS.&amp;nbsp; Here is the URL:&amp;nbsp; &lt;A class="active_link" href="http://www.ats.ucla.edu/stat/sas/default.htm" title="http://www.ats.ucla.edu/stat/sas/default.htm"&gt;http://www.ats.ucla.edu/stat/sas/default.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;They have nice tutorials and movies to watch.&lt;/P&gt;&lt;P&gt;SAS also has free training.&amp;nbsp; Check this link:&amp;nbsp; &lt;A href="http://support.sas.com/training/us/sp1.html" title="http://support.sas.com/training/us/sp1.html"&gt;SAS Training Starting Points&lt;/A&gt;&amp;nbsp; Look for the "Free Training at Your Fingertips".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enjoy learning!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Roger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Jan 2015 17:19:18 GMT</pubDate>
    <dc:creator>rogerward</dc:creator>
    <dc:date>2015-01-21T17:19:18Z</dc:date>
    <item>
      <title>Group rows that are duplicated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Group-rows-that-are-duplicated/m-p/191944#M266167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello to everyone!&lt;/P&gt;&lt;P&gt;Does anybody know if there is a way to group rows that are duplicated in a data set? For example, to put them at the end, or mark them with a color, or create another data set with the duplicated rows.&lt;/P&gt;&lt;P&gt;I appreciate any kind of help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Milenko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2015 15:53:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Group-rows-that-are-duplicated/m-p/191944#M266167</guid>
      <dc:creator>MilenkoAndreas</dc:creator>
      <dc:date>2015-01-21T15:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Group rows that are duplicated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Group-rows-that-are-duplicated/m-p/191945#M266168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please attach some sample data to show what you require.&lt;/P&gt;&lt;P&gt;PROC SORT has a DUPOUT= option that might suit your need.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2015 16:07:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Group-rows-that-are-duplicated/m-p/191945#M266168</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-01-21T16:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: Group rows that are duplicated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Group-rows-that-are-duplicated/m-p/191946#M266169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Linus! Thank you so much for your reply!&lt;/P&gt;&lt;P&gt;Im not so sure what PROC SORT does, Im kind of new in SAS Guide, and I just know how to use some tasks, I guess you are talking about prorgraming. If that is the right path to take, could you tell me if there is a good tutorial for beginners? Please!&lt;/P&gt;&lt;P&gt;Anyway the data is just a matrix with 10 colunms, some columns have dates, others have strings and others numbers.&amp;nbsp; I dont know if that is enough info, how should I send a sample data?...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Milenko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2015 17:07:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Group-rows-that-are-duplicated/m-p/191946#M266169</guid>
      <dc:creator>MilenkoAndreas</dc:creator>
      <dc:date>2015-01-21T17:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: Group rows that are duplicated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Group-rows-that-are-duplicated/m-p/191947#M266170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp; Milenko,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UCLA operates a great site for individuals wanting to learn SAS.&amp;nbsp; Here is the URL:&amp;nbsp; &lt;A class="active_link" href="http://www.ats.ucla.edu/stat/sas/default.htm" title="http://www.ats.ucla.edu/stat/sas/default.htm"&gt;http://www.ats.ucla.edu/stat/sas/default.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;They have nice tutorials and movies to watch.&lt;/P&gt;&lt;P&gt;SAS also has free training.&amp;nbsp; Check this link:&amp;nbsp; &lt;A href="http://support.sas.com/training/us/sp1.html" title="http://support.sas.com/training/us/sp1.html"&gt;SAS Training Starting Points&lt;/A&gt;&amp;nbsp; Look for the "Free Training at Your Fingertips".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enjoy learning!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Roger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2015 17:19:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Group-rows-that-are-duplicated/m-p/191947#M266170</guid>
      <dc:creator>rogerward</dc:creator>
      <dc:date>2015-01-21T17:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Group rows that are duplicated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Group-rows-that-are-duplicated/m-p/191948#M266171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, rogerward!! I will visit those places for sure!! Thank you so much!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2015 17:25:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Group-rows-that-are-duplicated/m-p/191948#M266171</guid>
      <dc:creator>MilenkoAndreas</dc:creator>
      <dc:date>2015-01-21T17:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Group rows that are duplicated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Group-rows-that-are-duplicated/m-p/191949#M266172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey! I just learned how to use that function! :smileygrin:&amp;nbsp; Thank you so much!! It worked&amp;nbsp; just fine!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2015 18:20:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Group-rows-that-are-duplicated/m-p/191949#M266172</guid>
      <dc:creator>MilenkoAndreas</dc:creator>
      <dc:date>2015-01-21T18:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Group rows that are duplicated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Group-rows-that-are-duplicated/m-p/191950#M266173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Milenko,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To answer your question, the SORT procedure (written as PROC SORT) in the SAS editor window sorts your observations based on any number of variables in your data set. For example, you mentioned dates, you can sort the data by dates, using a BY statement, and keep the first record with a given date in your data set and copy the duplicate records into a new data set using the DUPOUT= option mentioned above. Here is an example:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;proc &lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;sort&lt;/STRONG&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=file &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;dupout&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;=dup &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;nodupkey&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;by &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;var1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="line-height: 115%; color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; line-height: 115%; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that you can sort a data set by any number of BY variables (second line), not just the date, but other variables in your data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maik.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2015 18:25:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Group-rows-that-are-duplicated/m-p/191950#M266173</guid>
      <dc:creator>MaikH_Schutze</dc:creator>
      <dc:date>2015-01-21T18:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Group rows that are duplicated</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Group-rows-that-are-duplicated/m-p/191951#M266174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Maik! Thank you so much! that is exactly what I used!&amp;nbsp; Your help is very appreciate!!&lt;/P&gt;&lt;P&gt;Kind regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2015 18:44:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Group-rows-that-are-duplicated/m-p/191951#M266174</guid>
      <dc:creator>MilenkoAndreas</dc:creator>
      <dc:date>2015-01-21T18:44:19Z</dc:date>
    </item>
  </channel>
</rss>

