<?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: Creating columns out of rows in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475206#M122178</link>
    <description>Oh WOW! So easy! Thank you so much!!!</description>
    <pubDate>Tue, 03 Jul 2018 15:00:09 GMT</pubDate>
    <dc:creator>Amanda_Lemon</dc:creator>
    <dc:date>2018-07-03T15:00:09Z</dc:date>
    <item>
      <title>Creating columns out of rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/471898#M120913</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data set that looks like this: each person (ID) was tested twice: at Time 1 and at Time 2 (so there are two rows for each ID). Each person also has its gender and race (these values will not differ for the same person).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; Time&amp;nbsp; TestScore Gender Race&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, I want my data set to look like that:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID TestScore1 TestScore2 Gender Race&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran out of ideas to try... Is there an easy way to create a data set in this form?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 20:19:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/471898#M120913</guid>
      <dc:creator>Amanda_Lemon</dc:creator>
      <dc:date>2018-06-20T20:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: Creating columns out of rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/471905#M120916</link>
      <description>&lt;P&gt;PROC TRANSPOSE? Use ID, Gender, Race as your BY variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/151986"&gt;@Amanda_Lemon&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a data set that looks like this: each person (ID) was tested twice: at Time 1 and at Time 2 (so there are two rows for each ID). Each person also has its gender and race (these values will not differ for the same person).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID&amp;nbsp; Time&amp;nbsp; TestScore Gender Race&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, I want my data set to look like that:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID TestScore1 TestScore2 Gender Race&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ran out of ideas to try... Is there an easy way to create a data set in this form?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 20:26:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/471905#M120916</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-20T20:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: Creating columns out of rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/471906#M120917</link>
      <description>&lt;P&gt;PROC TRANSPOSE? Use ID, Gender, Race as your BY variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/151986"&gt;@Amanda_Lemon&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a data set that looks like this: each person (ID) was tested twice: at Time 1 and at Time 2 (so there are two rows for each ID). Each person also has its gender and race (these values will not differ for the same person).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID&amp;nbsp; Time&amp;nbsp; TestScore Gender Race&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, I want my data set to look like that:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID TestScore1 TestScore2 Gender Race&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ran out of ideas to try... Is there an easy way to create a data set in this form?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 20:26:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/471906#M120917</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-20T20:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Creating columns out of rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/471914#M120919</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID  Time  TestScore Gender Race;
cards;
1       1            5              1        2
1       2            7              1        2
2       1            3              2        4
2       2            8              2        4
3       1            1              1        3
3       2            4              1        3
;
run;

proc transpose data=have out=want(drop=_:) prefix=testscore;
by id gender race;
var TestScore;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Jun 2018 20:31:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/471914#M120919</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-06-20T20:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Creating columns out of rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/471922#M120920</link>
      <description>&lt;P&gt;It works! Thank you!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A follow-up question: I am not quite sure which of my variables are attributes of a person (i.e., don't vary within a person between Time 1 and Time 2) and which are attributes of a test (different values for Time 1 and Time 2 for the same person). Is there an easy way to find out which variables are which?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The best option I found so far is to split the file into two: one file with Time 1 values and another file with Time 2 values, and then use proc compare. It gives me a table with unequal values... but I thought maybe there is a way that I can get a LIST of variables with unequal values and a LIST of variables with equal values so that it's easier to copy-paste in proc transpose? (I have about 600 variables, so I am really looking to automatize this process...).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas would be highly appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 20:55:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/471922#M120920</guid>
      <dc:creator>Amanda_Lemon</dc:creator>
      <dc:date>2018-06-20T20:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Creating columns out of rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/471923#M120921</link>
      <description>&lt;P&gt;Working on a very similar problem at the moment. I test it out by checking if the max=min for the variables in question across the person ID.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This is easier done in SQL than a data step because PROC SQL will allow the max/min functions to be used on character variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 20:57:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/471923#M120921</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-20T20:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Creating columns out of rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/471933#M120923</link>
      <description>&lt;P&gt;You could play with this approach&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=have noprint;
by id;
var _all_;
output out=want(drop= _:) std=;
run;
proc transpose data=want(obs=1) out=w;
run;
proc sql;
select _name_ into :by_group separated by ' '
from w
where col1 = 0;

select _name_ into :tranpose_var separated by ' '
from w
where col1 ne  0;

quit;
/*by group and transpose lists*/
%put &amp;amp;by_group;
%put &amp;amp;tranpose_var;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Jun 2018 21:21:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/471933#M120923</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-06-20T21:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating columns out of rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475171#M122168</link>
      <description>&lt;P&gt;So, this code works only if I have 1 test. But now I have many tests... So, I thought maybe I can do this code for all of my test variables separately and then just merge the data sets.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what I came up with so far. The problem is that I don't know how to assign names to the "want" data set so that each newly created want has its unique name, e.g., want_Test1, want_Test2, etc. (So that I can merge them at the end by the ID and demographic variables). The same problem with COL1 and COL2 that are in each want data set -- I need to rename COL1 into Test1_1 and COL2 into Test1_2 in the first data set, COL1 into Test2_1 and COL2 into Test2_2 in the second data set, etc. Could someone please help me with that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data varset_test;
length test_name $40;
do test_name = 'Test1', 'Test2', 'Test3';
     output;
end;
run;
%macro trans(test=);
proc transpose data=have out=want(drop=_:);
by ID Race Gender Age;
var &amp;amp;test;
run;
%mend trans;
data new;
set varset_test;
call execute('%trans(test='||strip(test_name)||');');
run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank you in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S. Maybe there is an easier way to do transposing for multiple test variables than what I am trying to do?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 13:45:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475171#M122168</guid>
      <dc:creator>Amanda_Lemon</dc:creator>
      <dc:date>2018-07-03T13:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Creating columns out of rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475179#M122171</link>
      <description>&lt;P&gt;Can you please provide us a full comprehensive sample of your dataset and an output sample to that input sample that is great representative plz? This would help in focusing on getting to develop a solution in one go and in full.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 14:03:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475179#M122171</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-07-03T14:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: Creating columns out of rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475184#M122174</link>
      <description>&lt;P&gt;Sure! So, the first table below is what I have: People were tested twice, and for each testing time there is a separate row for each person. Test scores are different between rows within a person but demographic variables are the same.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Time&lt;/TD&gt;&lt;TD&gt;Gender&lt;/TD&gt;&lt;TD&gt;Race&lt;/TD&gt;&lt;TD&gt;Age&lt;/TD&gt;&lt;TD&gt;Test1&lt;/TD&gt;&lt;TD&gt;Test2&lt;/TD&gt;&lt;TD&gt;Test3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;70&lt;/TD&gt;&lt;TD&gt;50&lt;/T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t;1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;36&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;TD&gt;45&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second table is what I want: to have one row per person and to have two variables for each test -- one variable for the test at Time 1 and another variable for the test at Time 2. And like that for each test.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Gender&lt;/TD&gt;&lt;TD&gt;Race&lt;/TD&gt;&lt;TD&gt;Age&lt;/TD&gt;&lt;TD&gt;Test1_1&lt;/TD&gt;&lt;TD&gt;Test1_2&lt;/TD&gt;&lt;TD&gt;Test2_1&lt;/TD&gt;&lt;TD&gt;Test2_2&lt;/TD&gt;&lt;TD&gt;Test3_1&lt;/TD&gt;&lt;TD&gt;Test3_2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;70&lt;/TD&gt;&lt;TD&gt;75&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;45&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;31&lt;/TD&gt;&lt;TD&gt;35&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;65&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R&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 03 Jul 2018 14:19:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475184#M122174</guid>
      <dc:creator>Amanda_Lemon</dc:creator>
      <dc:date>2018-07-03T14:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: Creating columns out of rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475199#M122176</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/151986"&gt;@Amanda_Lemon&lt;/a&gt;&amp;nbsp;Sorry for the little delay as&amp;nbsp; i was away for my morning coffee. Hmm Thank you for better sample and clear requirement. Very straight forward indeed with a double transpose--&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID	Time	Gender	Race	Age	Test1	Test2	Test3;
datalines;
1	1	0	1	22	50	70	50
1	2	0	1	22	60	75	45
2	1	1	3	31	35	60	30
2	2	1	3	31	80	65	60
3	1	1	5	18	25	85	50
3	2	1	5	18	45	90	40
4	1	1	1	42	10	20	80
4	2	1	1	42	60	70	50
5	1	0	2	21	50	60	60
5	2	0	2	21	55	40	80
6	1	1	2	36	70	40	15
6	2	1	2	36	80	45	30
;
proc transpose data=have out=temp;
by id  gender race age time;
var test:;
run;
proc sort data=temp;
by id gender race age _name_ time;
run;
proc transpose data=temp out=want delim=_;
by id gender race age  ;
var col1;
id _name_ time;
run;

proc transpose data=temp out=want(drop=_name_) delim=_;
by id gender race age  ;
var col1;
id _name_ time;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 14:55:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475199#M122176</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-07-03T14:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Creating columns out of rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475206#M122178</link>
      <description>Oh WOW! So easy! Thank you so much!!!</description>
      <pubDate>Tue, 03 Jul 2018 15:00:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475206#M122178</guid>
      <dc:creator>Amanda_Lemon</dc:creator>
      <dc:date>2018-07-03T15:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating columns out of rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475212#M122180</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/151986"&gt;@Amanda_Lemon&lt;/a&gt;&amp;nbsp;There you go, the more clearer the INPUT sample and the WANTED&amp;nbsp; output sample, it makes it easy for all of us. If you are satisfied with answer, may i request to mark the answer that you accept and close the thread plz. Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 15:03:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475212#M122180</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-07-03T15:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Creating columns out of rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475515#M122284</link>
      <description>&lt;P&gt;Ran into a problem... It appears that if at least one of my test variables&amp;nbsp;is a character variable, then the output of proc transpose for ALL test variables would be character. Is there any way to prevent that from happening? I need my numeric test variables to continue being numeric in the output. Below is the kind of input data set that I am talking about:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID	Time	Gender	Race	Age	Test1	Test2	Test3 Test4 $;
datalines;
1	1	0	1	22	50	70	50  A
1	2	0	1	22	60	75	45  B
2	1	1	3	31	35	60	30  A
2	2	1	3	31	80	65	60  C
3	1	1	5	18	25	85	50  C
3	2	1	5	18	45	90	40  A
4	1	1	1	42	10	20	80  C
4	2	1	1	42	60	70	50  D
5	1	0	2	21	50	60	60  F
5	2	0	2	21	55	40	80  B
6	1	1	2	36	70	40	15  F
6	2	1	2	36	80	45	30  C
;
proc transpose data=have out=temp;
by id  gender race age time;
var test:;
run;
proc sort data=temp;
by id gender race age _name_ time;
run;
proc transpose data=temp out=want delim=_;
by id gender race age  ;
var col1;
id _name_ time;
run;

proc transpose data=temp out=want(drop=_name_) delim=_;
by id gender race age  ;
var col1;
id _name_ time;
run;&lt;/CODE&gt;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 03:23:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475515#M122284</guid>
      <dc:creator>Amanda_Lemon</dc:creator>
      <dc:date>2018-07-05T03:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Creating columns out of rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475516#M122285</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/151986"&gt;@Amanda_Lemon&lt;/a&gt;&amp;nbsp; Can i respond to you soon as get to my college lab tomorrow morning chicago time. I'm afraid i dont have SAS software at home and it is 10:25pm here. Meanwhile, Please try and make sure you provide us the best sample you can.&lt;/P&gt;&lt;P&gt;Good night for now and will look into it first thing in the morning.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 03:26:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475516#M122285</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-07-05T03:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Creating columns out of rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475597#M122312</link>
      <description>Absolutely! Thank you for your help!&lt;BR /&gt;&lt;BR /&gt;The sample above is quite representative, I think. The problem is in adding character variables -- without them, numeric variables transpose fine, but with them, numeric variables become character...</description>
      <pubDate>Thu, 05 Jul 2018 12:31:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475597#M122312</guid>
      <dc:creator>Amanda_Lemon</dc:creator>
      <dc:date>2018-07-05T12:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Creating columns out of rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475631#M122317</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/151986"&gt;@Amanda_Lemon&lt;/a&gt;&amp;nbsp; Good morning, Please find the below fix&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID	Time	Gender	Race	Age	Test1	Test2	Test3 Test4 $;
datalines;
1	1	0	1	22	50	70	50  A
1	2	0	1	22	60	75	45  B
2	1	1	3	31	35	60	30  A
2	2	1	3	31	80	65	60  C
3	1	1	5	18	25	85	50  C
3	2	1	5	18	45	90	40  A
4	1	1	1	42	10	20	80  C
4	2	1	1	42	60	70	50  D
5	1	0	2	21	50	60	60  F
5	2	0	2	21	55	40	80  B
6	1	1	2	36	70	40	15  F
6	2	1	2	36	80	45	30  C
;
/*separate the needed the vars by read and splitting into 2 sets chars and nums with by group vars*/
data chars(keep=id  gender race age time _char_) nums(keep=id  gender race age time _numeric_);
set have(keep=id  gender race age time test:);
run;
/*parse the nums */
proc transpose data=nums out=temp;
by id  gender race age time;
var test:;
run;
proc sort data=temp;
by id gender race age _name_ time;
run;
proc transpose data=temp out=want1(drop=_name_) delim=_;
by id gender race age  ;
var col1;
id _name_ time;
run;
/*parse the chars */
proc transpose data=chars out=temp;
by id  gender race age time;
var test:;
run;
proc sort data=temp;
by id gender race age _name_ time;
run;
proc transpose data=temp out=want2(drop=_name_) delim=_;
by id gender race age  ;
var col1;
id _name_ time;
run;
/*combine the tranposed chars and nums into one*/
data final_want;
merge want1 want2;
run;



&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 14:12:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475631#M122317</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-07-05T14:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: Creating columns out of rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475653#M122320</link>
      <description>&lt;P&gt;&lt;A href="http://www.sascommunity.org/wiki/A_Better_Way_to_Flip_(Transpose)_a_SAS_Dataset" target="_blank"&gt;http://www.sascommunity.org/wiki/A_Better_Way_to_Flip_(Transpose)_a_SAS_Dataset&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The macro on this page will do what you want, and it's pre-packaged. Worth learning how to use.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 14:52:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475653#M122320</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-07-05T14:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Creating columns out of rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475888#M122397</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt; and &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;, thank you both! I understood both approaches. Thanks again for your help!</description>
      <pubDate>Fri, 06 Jul 2018 02:40:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475888#M122397</guid>
      <dc:creator>Amanda_Lemon</dc:creator>
      <dc:date>2018-07-06T02:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Creating columns out of rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475889#M122398</link>
      <description>One more question -- is there a similarly easy way to do the reverse procedure, i.e., transform a wide data set into a tall one?</description>
      <pubDate>Fri, 06 Jul 2018 02:43:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-columns-out-of-rows/m-p/475889#M122398</guid>
      <dc:creator>Amanda_Lemon</dc:creator>
      <dc:date>2018-07-06T02:43:32Z</dc:date>
    </item>
  </channel>
</rss>

