<?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 Wide to Long in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Wide-to-Long/m-p/666400#M199374</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I have a dataset below that I would like to transpose from wide to long format. I've always struggled with getting proc transpose to do what I envision but thinking that proc transpose can't handle this request. I have many other measurements and time periods so hopefully there is some method out there that can handle more than what I am presenting here in the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input id approach diet time1 measure1_1 measure2_1 $ time2 measure1_2 measure2_2 $ time3 measure1_3 measure2_3 $;
cards;
1 1 1 10 5 water 85 10 water 100 103 water
2 2 2 12 5 protein 92 11 water 102 103 water
;
run;&lt;BR /&gt;&lt;BR /&gt;data want;&lt;BR /&gt;input id approach diet time measure1 measure2 $;&lt;BR /&gt;cards;&lt;BR /&gt;1 1 1 10 5 water&lt;BR /&gt;1 1 1 85 10 water&lt;BR /&gt;1 1 1 100 103 water&lt;BR /&gt;2 2 2 12 5 protein&lt;BR /&gt;2 2 2 92 11 water&lt;BR /&gt;2 2 2 102 103 water&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 01 Jul 2020 14:59:20 GMT</pubDate>
    <dc:creator>PeterBr</dc:creator>
    <dc:date>2020-07-01T14:59:20Z</dc:date>
    <item>
      <title>Wide to Long</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wide-to-Long/m-p/666400#M199374</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I have a dataset below that I would like to transpose from wide to long format. I've always struggled with getting proc transpose to do what I envision but thinking that proc transpose can't handle this request. I have many other measurements and time periods so hopefully there is some method out there that can handle more than what I am presenting here in the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input id approach diet time1 measure1_1 measure2_1 $ time2 measure1_2 measure2_2 $ time3 measure1_3 measure2_3 $;
cards;
1 1 1 10 5 water 85 10 water 100 103 water
2 2 2 12 5 protein 92 11 water 102 103 water
;
run;&lt;BR /&gt;&lt;BR /&gt;data want;&lt;BR /&gt;input id approach diet time measure1 measure2 $;&lt;BR /&gt;cards;&lt;BR /&gt;1 1 1 10 5 water&lt;BR /&gt;1 1 1 85 10 water&lt;BR /&gt;1 1 1 100 103 water&lt;BR /&gt;2 2 2 12 5 protein&lt;BR /&gt;2 2 2 92 11 water&lt;BR /&gt;2 2 2 102 103 water&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Jul 2020 14:59:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wide-to-Long/m-p/666400#M199374</guid>
      <dc:creator>PeterBr</dc:creator>
      <dc:date>2020-07-01T14:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Wide to Long</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wide-to-Long/m-p/666408#M199381</link>
      <description>&lt;P&gt;The %UNTRANSOPSE macro does exactly what you want.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2018/2419-2018.pdf" target="_blank"&gt;https://support.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2018/2419-2018.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The command shown on page 3 is analogous to your problem and ought to work.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2020 15:25:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wide-to-Long/m-p/666408#M199381</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-01T15:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: Wide to Long</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wide-to-Long/m-p/666530#M199447</link>
      <description>&lt;P&gt;Works well, thanks for sharing!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2020 02:55:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wide-to-Long/m-p/666530#M199447</guid>
      <dc:creator>PeterBr</dc:creator>
      <dc:date>2020-07-02T02:55:29Z</dc:date>
    </item>
  </channel>
</rss>

