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 (July 2002, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 10 Jul 2002 17:15:26 -0400
Reply-To:   Howard_Schreier@ITA.DOC.GOV
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Howard_Schreier@ITA.DOC.GOV
Subject:   Re: excluding records on the fly

Do you have any overall objective, such as maximizing the sum of ValueN over the grouped neighbours or minimizing the number of ID values which do not get grouped? Or are you willing to let ID=1,2, etc., apply this decision rule successively, and accept whatever is the result?

On Wed, 10 Jul 2002 15:29:45 GMT, N Yiannakoulias <nwy@SRV.UALBERTA.CA> wrote:

>Hi all, > >I have a large data set which represents a 2 dimensional >grid over a geographic area. I've built an adjacency >file of this grid that looks like this: > >ID NID ValueN >1 2 65 >1 6 26 >2 1 26 >2 3 30 >2 7 2 >3 2 65 >3 4 34 >3 8 88 >and so on... > >ID is an identifier for each grid >NID is a neighbour's ID >ValueN is a value associated with a neighbour > >Now, I want to group adjacent records such that starting >with area 1 (represented by ID=1) the adjacent area with >the largest ValueN is grouped with this area (ID=1). >Once a neighbour is grouped, it can no longer be a part >of any other group. _This is where I get stuck_. For >example, NID=2 meets the condition for area 1. As a >result, records with NID=2 AND ID=2 should be removed >from the dataset as I proceed with grouping. I haven't >been able to do this successfully. Can anyone offer >any advice? It seems pretty trivial, but maybe it isn't? > >N


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