|Date: ||Thu, 24 Jul 1997 09:39:47 GMT|
|Reply-To: ||Per F Andersen <Per_Andersen@ODIR.KK.DK>|
|Sender: ||"SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>|
|From: ||Per F Andersen <Per_Andersen@ODIR.KK.DK>|
|Organization: ||Kxbenhavns Kommune|
|Subject: ||Re: need an elegant way to compare columns|
You could make a string of the numbers and missing values end then use Proc
Sort with Nodupkey.
Best regards Per Andersen
Jennifer.Soller@sf.frb.org skrev i artiklen
> Hello to all! I am once again searching for elegance.
> I have written a macro which generates a column of 50 numbers
> and missing values placed in a specific order. The numbers were
> initially randomly generated and then placed in their position
> based on a set of convoluted constraints, with the missing value
> serving as a delimiter between groups:
> OBS I1
> 1 .
> 2 13
> 3 42
> 4 53
> 5 .
> 6 19
> 7 .
> 8 4
> 9 6
> 10 15
> 11 41
> and so on, down to 62 places (the 50 states divided into 12 groups).
> Right now, my macro generates this column (called I1 for iteration 1).
> I am going to generate hundreds, if not thousands, of these columns
> but I need to make sure that no column is generated more than once.
> The end result would be a dataset containing different permutations of
> 50 states assigned to 12 groups. So I need some way to compare the
> columns as they are generated:
> upon generation of column I2, compare it to I1 -- if it matches,
> it. Generate I3, compare it to I1, delete if match, compare to I2,
> delete if match, and so on.
> I've been brainstorming and have come up with a really convoluted,
> messy way to do this -- most likely any way would be better. Anyone
> up for the challenge? Or is this really simple, and I am just not
> seeing it?
> Thanks in advance.
> Jennifer Soller
> Senior Research Associate
> Federal Reserve Bank of San Francisco
> (415) 974-2377 Jennifer.Soller@sf.frb.org
> -------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet