Date: Thu, 24 Jul 1997 11:45:37 +0500
Reply-To: Bernard Tremblay <bernard@CAPITALE.QC.CA>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Bernard Tremblay <bernard@CAPITALE.QC.CA>
Subject: Re: need an elegant way to compare columns
Hi,
May be you could transpose your dataset, then do a sort with
nodupkey on col1-col50 and transpose it back like it was ??? This would
eliminate columns that are the same.
Hope it helps,
Bernard Tremblay
\\\|///
\\ - - //
( @ @ )
+------oOOo-(_)-oOOo----------+---------------------------------+
| Bernard Tremblay | |
| La Capitale | Tel: (418) 646-2401 |
| | Fax: (418) 646-5960 |
| | Int: bernard@capitale.qc.ca |
+-----------------------------+---------------------------------+
| Imaginasys enr | Res: (418) 878-4447 |
| | Int: bertrem@quebectel.com |
+---------------Oooo----------+---------------------------------+
oooO ( )
( ) ) /
\ ( (_/
\_)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>From owner-sas-l@UGA.CC.UGA.EDU Thu Jul 24 09:50 EDT 1997
>>>Nntp-Posting-Host: gateway.kk.dk
>>>X-Newsreader: Microsoft Internet News 4.70.1161
>>>Xref: paladin.american.edu comp.soft-sys.sas:41244
>>>Date: Thu, 24 Jul 1997 09:39:47 GMT
>>>From: Per F Andersen <Per_Andersen@ODIR.KK.DK>
>>>Subject: Re: need an elegant way to compare columns
>>>To: SAS-L@UGA.CC.UGA.EDU
>>>
>>>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
>>><869670453.14828@dejanews.com>...
>>>> 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,
>>>> delete
>>>> 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
>>>>
>>>
|