<?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: Trying to Transpose Multiple Variables Long to Wide in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-Transpose-Multiple-Variables-Long-to-Wide/m-p/679276#M205108</link>
    <description>What does the have represent? Is that just a keyword? Do I have set this data to my previous data?</description>
    <pubDate>Tue, 25 Aug 2020 19:35:30 GMT</pubDate>
    <dc:creator>skatethejake</dc:creator>
    <dc:date>2020-08-25T19:35:30Z</dc:date>
    <item>
      <title>Trying to Transpose Multiple Variables Long to Wide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-Transpose-Multiple-Variables-Long-to-Wide/m-p/679259#M205102</link>
      <description>&lt;P&gt;Hello All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to transpose some stock data that I generated in R. There are two entries for one stock symbol, I will attach the photo so that you may be able to understand better what I am saying. All I want is one row, not two, for each stock symbol.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried this&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=pa.regression_stats out=pa.transposed_data;
	by Var;
	var estimate p_value statistic std_error;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But it does the exact opposite of what I want, converting it into four rows instead of two&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-08-25 at 3.07.45 PM.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48630iEF268F99D7F22768/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-08-25 at 3.07.45 PM.png" alt="Screen Shot 2020-08-25 at 3.07.45 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 19:08:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-Transpose-Multiple-Variables-Long-to-Wide/m-p/679259#M205102</guid>
      <dc:creator>skatethejake</dc:creator>
      <dc:date>2020-08-25T19:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to Transpose Multiple Variables Long to Wide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-Transpose-Multiple-Variables-Long-to-Wide/m-p/679261#M205104</link>
      <description>&lt;P&gt;A merge is probably easier for this one IMO.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
merge have (where=( term = '(Intercept)'))
           have (where=( term = 'VFINX') rename = (estimate = vfinx_est std_error = vfinx_std_error statistic = vfinx_stat));
by Var;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/331031"&gt;@skatethejake&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello All,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to transpose some stock data that I generated in R. There are two entries for one stock symbol, I will attach the photo so that you may be able to understand better what I am saying. All I want is one row, not two, for each stock symbol.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried this&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc transpose data=pa.regression_stats out=pa.transposed_data;
	by Var;
	var estimate p_value statistic std_error;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But it does the exact opposite of what I want, converting it into four rows instead of two&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-08-25 at 3.07.45 PM.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48630iEF268F99D7F22768/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-08-25 at 3.07.45 PM.png" alt="Screen Shot 2020-08-25 at 3.07.45 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 19:12:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-Transpose-Multiple-Variables-Long-to-Wide/m-p/679261#M205104</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-08-25T19:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to Transpose Multiple Variables Long to Wide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-Transpose-Multiple-Variables-Long-to-Wide/m-p/679276#M205108</link>
      <description>What does the have represent? Is that just a keyword? Do I have set this data to my previous data?</description>
      <pubDate>Tue, 25 Aug 2020 19:35:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-Transpose-Multiple-Variables-Long-to-Wide/m-p/679276#M205108</guid>
      <dc:creator>skatethejake</dc:creator>
      <dc:date>2020-08-25T19:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to Transpose Multiple Variables Long to Wide</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Trying-to-Transpose-Multiple-Variables-Long-to-Wide/m-p/679578#M205216</link>
      <description>&lt;P&gt;Have represents your input data set. Replace it with your data set name.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 19:23:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Trying-to-Transpose-Multiple-Variables-Long-to-Wide/m-p/679578#M205216</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-08-26T19:23:54Z</dc:date>
    </item>
  </channel>
</rss>

