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 (August 2010, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 3 Aug 2010 14:59:29 -0700
Reply-To:     "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Terjeson, Mark" <Mterjeson@RUSSELL.COM>
Subject:      Re: Displaying all textual data in a table
Comments: To: matt.pettis@thomsonreuters.com
In-Reply-To:  <89C159F45B13A24682D98BDEF58E451F2A582C78@TLRUSMNEAGMBX28.ERF.THOMSON.COM>
Content-Type: text/plain; charset="us-ascii"

...as far as thinking the columns had to be numeric/analyzable, you are on track for procs like summary, means, et al... where they want to "crunch" some numbers. The proc TRANSPOSE merely just physically moves things around... PS: I prefer the PROC REPORT as well.

(hope your forehead is okay)

Mark

-----Original Message----- From: matt.pettis@thomsonreuters.com [mailto:matt.pettis@thomsonreuters.com] Sent: Tuesday, August 03, 2010 2:49 PM To: Terjeson, Mark; SAS-L@LISTSERV.UGA.EDU Subject: RE: Displaying all textual data in a table

Thanks Mark,

This would work -- I just assumed that the 'var' columns had to be numeric/analyzable, and didn't do my due diligence to actually go back and check the documentation (slaps forehead) -- thanks! I think Data _Null_ had what I had originally envisioned PROC REPORT could do, if I just knew how... I'll respond to his email & the list to keep me from being so chatty on the list.

Thanks for the time and effort, Matt

-----Original Message----- From: Terjeson, Mark [mailto:Mterjeson@russell.com] Sent: Tuesday, August 03, 2010 4:39 PM To: Pettis, Matthew (Legal); SAS-L@LISTSERV.UGA.EDU Subject: RE: Displaying all textual data in a table

Hi Matt,

Will this work as one approach:

proc transpose data=have out=need(drop=_name_); by r; id c; var d; run;

proc print data=need; run;

Hope this is helpful.

Mark Terjeson Investment Business Intelligence Investment Management & Research Russell Investments 253-439-2367

Russell Global Leaders in Multi-Manager Investing

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Matthew Pettis Sent: Tuesday, August 03, 2010 2:34 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Displaying all textual data in a table

Hi,

Is there a nice proc to display data that is all textual, and has no numeric/analysis data? I have the following dataset, and I'd like to display it as shown below, but I cannot figure out a simple proc to do so. Has anybody else had this problem, and/or does anybody have a solution?

If the final output doesn't format correctly in your email or however you read this post, it should have 'c' values as column headers, 'r' values as row labels, and 'd' data as cell entries in the table.

PROC REPORT and PROC TABLULATE, as far as I can tell, require that the cells of the data have some numeric analysis variable. Also, I could fake this out with PROC PRINT or the like, but I'd rather not have to do any data manipulation to the table if I can make a PROC do the work for me.

Thanks, Matt

=== Input Data === data have; infile datalines; input r:$2. c:$2. d:$3.; datalines; r1 c1 d11 r1 c2 d12 r1 c3 d13 r2 c1 d21 r2 c2 d22 r2 c3 d23 r3 c1 d31 r3 c2 d32 r3 c3 d33 ; run;

=== Output should look like ===

c1 c2 c3 r1 d11 d12 d13 r2 d21 d22 d23 r3 d31 d32 d33


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