<?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: inverse transpose in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/inverse-transpose/m-p/233060#M54793</link>
    <description>&lt;P&gt;Hi mate,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try do the same thing in the following code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input Id (Prod1 Prod2 Prod3)($);
cards;
1 A B C
2 D E F
;;;;
run;
proc transpose 
name = NewVar1 
data = have 
out = need(rename=(col1=NewVar2))
;
by id;
var prod:;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps&lt;/P&gt;</description>
    <pubDate>Wed, 04 Nov 2015 12:59:50 GMT</pubDate>
    <dc:creator>DartRodrigo</dc:creator>
    <dc:date>2015-11-04T12:59:50Z</dc:date>
    <item>
      <title>inverse transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/inverse-transpose/m-p/233055#M54792</link>
      <description>&lt;P&gt;Hello Guys,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can someone write a code to get the folIowing result (TABLE WANT) ? Its a kind inverse transpose that we are used to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the table that i have.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;data have;&lt;BR /&gt;input group $ fields $ jan commax5.2 feb commax5.2 marc commax5.2;&lt;BR /&gt;datalines;&lt;BR /&gt;food cheap 1,22 1,55 2,38&lt;BR /&gt;food expens 3,02 3,33 4,38&lt;BR /&gt;food averag 2,12 2,42 3,23&lt;BR /&gt;drink cheap 1,42 1,25 1,38&lt;BR /&gt;drink expens 5,04 4,31 5,01&lt;BR /&gt;drink averag 3,26 2,42 3,21&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the result that i need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;data want;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;input group $ calc $ month $ value commax5.2;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;datalines;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;food cheap jan 1,22&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;food cheap feb 1,55&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;food cheap marc 2,38&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;food expens jan 3,02&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;food expens feb 3,33&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;food expens marc 4,38&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;food averag jan 2,12&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;food averag feb 2,42&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;food averag marc 3,23&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;drink cheap jan 1,42&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;drink cheap feb 1,25&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;drink cheap marc 1,38&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;drink expens jan 5,04&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;drink expens feb 4,31&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;drink expens marc 5,01&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;drink averag jan 3,26&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;drink averag feb 2,42&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;drink averag marc 3,21&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I apprecciate any&amp;nbsp;help for that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 12:40:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/inverse-transpose/m-p/233055#M54792</guid>
      <dc:creator>Augusto</dc:creator>
      <dc:date>2015-11-04T12:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: inverse transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/inverse-transpose/m-p/233060#M54793</link>
      <description>&lt;P&gt;Hi mate,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try do the same thing in the following code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input Id (Prod1 Prod2 Prod3)($);
cards;
1 A B C
2 D E F
;;;;
run;
proc transpose 
name = NewVar1 
data = have 
out = need(rename=(col1=NewVar2))
;
by id;
var prod:;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 12:59:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/inverse-transpose/m-p/233060#M54793</guid>
      <dc:creator>DartRodrigo</dc:creator>
      <dc:date>2015-11-04T12:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: inverse transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/inverse-transpose/m-p/233097#M54797</link>
      <description>&lt;P&gt;Here is a solution:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sort data=have;by group fields;&lt;BR /&gt;&lt;BR /&gt;proc transpose data=have out=want(rename=(_NAME_ = Month col1 = Value fields = Calc));by group fields;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 15:32:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/inverse-transpose/m-p/233097#M54797</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2015-11-04T15:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: inverse transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/inverse-transpose/m-p/233145#M54802</link>
      <description>&lt;PRE&gt;You can try this...&lt;BR /&gt;
data one;
input food$ test$ price1 price2;
array myarr (2)price1 price2;
do i = 1 to 2;
Price = myarr(i);
output;
end;
datalines;
Apple good 10 20
lichi bad 20 40
Apple good 40 70

;
run;
proc print data = one;
run;








&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Nov 2015 19:16:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/inverse-transpose/m-p/233145#M54802</guid>
      <dc:creator>pearsoninst</dc:creator>
      <dc:date>2015-11-04T19:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: inverse transpose</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/inverse-transpose/m-p/233165#M54803</link>
      <description>&lt;P&gt;Just a standard transpose. No need to sort.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=have name=month
    out=want(rename=(col1=value fields=calc));
by group fields notsorted;
var jan feb marc;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Nov 2015 20:16:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/inverse-transpose/m-p/233165#M54803</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-11-04T20:16:12Z</dc:date>
    </item>
  </channel>
</rss>

