LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (January 1998, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 29 Jan 1998 09:25:23 -0500
Reply-To:   rcoleman@worldnet.att.net
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   Ron Coleman <rcoleman@WORLDNET.ATT.NET>
Organization:   Links Analytical, Inc.
Subject:   Re: SAS BEGINER
Content-Type:   text/plain; charset=us-ascii

francois wrote:

> It would be easier in french.. > > I have a table with 3 variables a , b and c. > > I use "a" with the format fa ,for instance > 0-10 : " 0 < a < 10 " > 11-20 : " 11 < a < 20 " > ..... > > I use "b" with the format fb ,for instance > 0-1000 : " 0 < b < 1000 " > 1000-2000 : " 1001 < b < 2000 " > > At the end, I want to have something like that : > > 0 < b < 1000 1001 < b < 2000 > > 0 < a < 10 sum(c) sum(c) > > 11 < a < 20 sum(c) sum(c) > > In fact it's a little more complicate : > I should like to do that with the labels in the formats. So I should > not have to change my program even if I change the boundaries in the > formats. > > Merci beaucoup.

Francois,

Try:

proc format; value fa 0 - 10 = '00 <= a <= 10' 11-20 = '11<= a <= 20' ...; value fb 0 - 1000 = '0000 <= b <= 1000' 1001 - 2000 = '1001 <= b <= 2000' ...; run;

proc tabulate data=whatever order=formatted; class a b; var c; table a, b*c; format a fa. b fb.; run;

NOTE: The reason I use leading zeroes (0) is that the labels will be ordered alphabetically and this helps keep the proper order.

-- Ron Coleman A SAS Quality Partner. Links Analytical, Inc. Linking your data to your business! 3545-1 St. Johns Bluff Rd. Suite 300 Jacksonville FL 32224 mailto:rcoleman@linksanalytical.com (904) 641-4766


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