<?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: Replicate every id by all possible unique group present in data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Replicate-every-id-by-all-possible-unique-group-present-in-data/m-p/759721#M240139</link>
    <description>&lt;P&gt;&lt;FONT face="georgia,palatino" size="4"&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/281770"&gt;@maguiremq&lt;/a&gt;&amp;nbsp;for your quick reply.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="georgia,palatino" size="4"&gt;I was thinking something like datastep by reading a macro variable containing all the unique grp then using do loop to repeat for every row but I dunno how exactly.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="georgia,palatino" size="4"&gt;This is much easier and should do for now.&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Aug 2021 15:00:57 GMT</pubDate>
    <dc:creator>Miracle</dc:creator>
    <dc:date>2021-08-05T15:00:57Z</dc:date>
    <item>
      <title>Replicate every id by all possible unique group present in data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replicate-every-id-by-all-possible-unique-group-present-in-data/m-p/759701#M240130</link>
      <description>&lt;P&gt;&lt;FONT face="georgia,palatino"&gt;Dear All,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="georgia,palatino"&gt;Can I please seek your help on how to achieve this?&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="georgia,palatino"&gt;For example, I would like turn data X into data Y.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="georgia,palatino"&gt;Thanks a lot.&lt;/FONT&gt;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 96pt;" border="0" width="128" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD width="64" height="17" class="xl63" style="height: 12.75pt; width: 48pt;"&gt;Data X&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="width: 48pt;"&gt;Data Y&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" class="xl64" style="height: 12.75pt;"&gt;id&amp;nbsp; grp&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl64"&gt;id&amp;nbsp; grp&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" class="xl64" style="height: 12.75pt;"&gt;1&amp;nbsp; A&lt;/TD&gt;
&lt;TD class="xl64"&gt;1&amp;nbsp; A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" class="xl64" style="height: 12.75pt;"&gt;1&amp;nbsp; B&lt;/TD&gt;
&lt;TD class="xl64"&gt;1&amp;nbsp; B&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" class="xl64" style="height: 12.75pt;"&gt;2&amp;nbsp; A&lt;/TD&gt;
&lt;TD class="xl64"&gt;1 C&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" class="xl64" style="height: 12.75pt;"&gt;2&amp;nbsp; C&lt;/TD&gt;
&lt;TD class="xl64"&gt;2&amp;nbsp; A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" class="xl64" style="height: 12.75pt;"&gt;3&amp;nbsp; A&lt;/TD&gt;
&lt;TD class="xl64"&gt;2 B&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" class="xl64" style="height: 12.75pt;"&gt;3&amp;nbsp; B&lt;/TD&gt;
&lt;TD class="xl64"&gt;2&amp;nbsp; C&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" class="xl64" style="height: 12.75pt;"&gt;3&amp;nbsp; C&lt;/TD&gt;
&lt;TD class="xl64"&gt;3&amp;nbsp; A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" class="xl64" style="height: 12.75pt;"&gt;4&amp;nbsp; C&lt;/TD&gt;
&lt;TD class="xl64"&gt;3&amp;nbsp; B&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" style="height: 12.75pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl64"&gt;3&amp;nbsp; C&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" style="height: 12.75pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl64"&gt;4&amp;nbsp; A&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" style="height: 12.75pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl64"&gt;4&amp;nbsp; B&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 12.75pt;"&gt;
&lt;TD height="17" style="height: 12.75pt;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl64"&gt;4&amp;nbsp; C&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 14:25:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replicate-every-id-by-all-possible-unique-group-present-in-data/m-p/759701#M240130</guid>
      <dc:creator>Miracle</dc:creator>
      <dc:date>2021-08-05T14:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Replicate every id by all possible unique group present in data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replicate-every-id-by-all-possible-unique-group-present-in-data/m-p/759716#M240135</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data x;
input id grp $1.;
datalines;
1 A
1 B
2 A
2 C
3 A
3 B
4 C
;

proc freq
	data = x noprint;
		tables id * grp / 	sparse 
							out = y (drop = count percent);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;id grp 
1 A 
1 B 
1 C 
2 A 
2 B 
2 C 
3 A 
3 B 
3 C 
4 A 
4 B 
4 C 
&lt;/PRE&gt;
&lt;P&gt;I prefer the SPARSE statement with PROC FREQ to do things like this.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 14:53:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replicate-every-id-by-all-possible-unique-group-present-in-data/m-p/759716#M240135</guid>
      <dc:creator>maguiremq</dc:creator>
      <dc:date>2021-08-05T14:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Replicate every id by all possible unique group present in data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replicate-every-id-by-all-possible-unique-group-present-in-data/m-p/759721#M240139</link>
      <description>&lt;P&gt;&lt;FONT face="georgia,palatino" size="4"&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/281770"&gt;@maguiremq&lt;/a&gt;&amp;nbsp;for your quick reply.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="georgia,palatino" size="4"&gt;I was thinking something like datastep by reading a macro variable containing all the unique grp then using do loop to repeat for every row but I dunno how exactly.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="georgia,palatino" size="4"&gt;This is much easier and should do for now.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 15:00:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replicate-every-id-by-all-possible-unique-group-present-in-data/m-p/759721#M240139</guid>
      <dc:creator>Miracle</dc:creator>
      <dc:date>2021-08-05T15:00:57Z</dc:date>
    </item>
  </channel>
</rss>

