<?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: proc  transpose wide to long in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-transpose-wide-to-long/m-p/789449#M252625</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=wide out=long(rename=(value1=value)) prefix=value;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 11 Jan 2022 12:47:53 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-01-11T12:47:53Z</dc:date>
    <item>
      <title>proc  transpose wide to long</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-transpose-wide-to-long/m-p/789448#M252624</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I ask prefix "value" but in result I see prefix "value1"- what is the reason?&lt;/P&gt;
&lt;P&gt;I want to get new column name "value" and not "value1"&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data wide; 
  input famid faminc96 faminc97 faminc98 ; 
cards; 
1 40000 40500 41000 
2 45000 45400 45800 
3 75000 76000 77000 
; 
run; 
proc transpose data=wide out=long prefix=value;
   by famid;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Jan 2022 12:35:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-transpose-wide-to-long/m-p/789448#M252624</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2022-01-11T12:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: proc  transpose wide to long</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-transpose-wide-to-long/m-p/789449#M252625</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=wide out=long(rename=(value1=value)) prefix=value;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Jan 2022 12:47:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-transpose-wide-to-long/m-p/789449#M252625</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-01-11T12:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: proc  transpose wide to long</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-transpose-wide-to-long/m-p/789486#M252632</link>
      <description>&lt;P&gt;The reason is that is the way Proc Transpose works. It does not know that you will only have one value as each duplicate of the BY variable(s) increments the count.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="row vg-header"&gt;
&lt;DIV class="col"&gt;
&lt;P class="subheader-md hword2 english-learners"&gt;Essential Meaning of &lt;EM&gt;prefix&lt;/EM&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="learners-def"&gt;
&lt;DIV class="vg"&gt;
&lt;DIV class="sb no-sn"&gt;
&lt;DIV class="sense no-subnum"&gt;&lt;SPAN class="dt "&gt; &lt;SPAN class="dtText"&gt;&lt;STRONG class="mw_t_bc"&gt;: &lt;/STRONG&gt;to add a letter, number, or symbol at the beginning of a word or number&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="sense no-subnum"&gt;&lt;SPAN class="dt "&gt;&lt;SPAN class="dtText"&gt;So the Prefix option just says what the output variable names &lt;STRONG&gt;start &lt;/STRONG&gt;with.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 11 Jan 2022 15:52:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-transpose-wide-to-long/m-p/789486#M252632</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-01-11T15:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: proc  transpose wide to long</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-transpose-wide-to-long/m-p/789496#M252637</link>
      <description>&lt;P&gt;You could use the ID statement which would build-in a check for unique BY groups.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data wide; 
  input famid faminc96 faminc97 faminc98 ; 
  retain id 'Value';
cards; 
1 40000 40500 41000 
2 45000 45400 45800 
3 75000 76000 77000 
; 
run; 
proc transpose data=wide out=long;
   by famid;
   id id;
   run;
proc print;
   run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 178px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/67300i36E96B420CCD9133/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jan 2022 16:09:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-transpose-wide-to-long/m-p/789496#M252637</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2022-01-11T16:09:04Z</dc:date>
    </item>
  </channel>
</rss>

