proc transpose

Reply
Frequent Contributor
Posts: 89

proc transpose

Hai all

    I have a doubt in proc transpose.After the transpose i got the below mentioned dataset

  test_1     test_01   col1   col2    col3

   HA          A01      X           .      a

   HA          A02      Y           .      b     

   HA          A03      .

   .              .          .

   .              ..         .

   HA        A45       X                    c

I need to get the col2 below the col1 also col3 below the col2.col2 starts from A01 and end with A45 also for col3..Any way to solve this by using proc transpose?tra

Super Contributor
Posts: 336

Re: proc transpose

Not sure, if I understood you right ..

Data A;
  Input Test_1 $ Test_01 $ Col1 Col2 Col3;
  Datalines;
  HA A01 23 43 23
  HA A02 22 45 19
  HB A03 23 23 02
  HB A04 2 299 2
  ;
Run;

Proc Transpose Data=A Out=A_Vector (Rename=(Col1=Column1_to_3) Drop=_NAME_);
  By Test_1 Test_01;
  Var Col1-Col3;
Run;

Frequent Contributor
Posts: 89

Re: proc transpose

Thanks for your swift reply

Respected Advisor
Posts: 3,777

Re: proc transpose

You say after the transpose you got...

But you don't show the input or the PROC TRANSPOSE statements that you DID use.  Do you think that you omitted important information?

Ask a Question
Discussion stats
  • 3 replies
  • 454 views
  • 0 likes
  • 3 in conversation