LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2010, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 5 Feb 2010 11:58:10 -0500
Reply-To:     Ya Huang <ya.huang@AMYLIN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ya Huang <ya.huang@AMYLIN.COM>
Subject:      Re: How can I do data-set from proc tabulate table.
Comments: To: remilah@GMAIL.COM

If you need the dataset in the same structure as the tabulate output, you need to tranpose the data from long/narrow to short/wide.

I think a proc sql plus a proc tranpose should work. I don't have the data, so I can try it:

proc sql; create data b as select distinct year,high,count(*) as cnt from a group by year,high order by year,high ;

proc transpose data=b out=c; by year; id high; var cnt; run;

Please let us know if it works.

On Thu, 4 Feb 2010 23:37:23 -0800, Emil <remilah@GMAIL.COM> wrote:

>this is what i want to do: >i make some proc freq procedure let say: >proc freq data=a; >by year; >table high / out=year_high; >run; > >and then > >proc tabulate data=yer_high; >class year high; >var count; >table year,high*count; >run; > >and than i have this table (1); > >year high1 high2 high3 high4 high5 >------------------------------------------------------------------- >96 | 12 . . 2 1 >97 | 2 5 3 1 7 > >and so on > >and ods product (data-set) look like thise (2) >year >96 high1 12 >96 high2 . (that do not exist in data set) >96 high3 . (that do not exist in data set) >96 high4 2 > >and so on ... what is not useful for me. > >the question is how to put it in a form such as the above (1) > >Emil


Back to: Top of message | Previous page | Main SAS-L page