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 (March 2009, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 23 Mar 2009 11:51:26 -0700
Reply-To:     "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM>
Subject:      Re: Fo the same vtf_id I would like keep only one observation and
In-Reply-To:  <ddc90cc5-a4cf-4dd5-8e34-b29905be4149@v15g2000yqn.googlegroups.com>
Content-Type: text/plain; charset="us-ascii"

Is the data ordered within Vtf_Id by the hierarchy of varA? If there is a K, is it guaranteed to precede any V?

If not, sort the observations in this order, possibly using PROC TRANTAB.

Once the data is sorted, simply save the first observation for each VTF-Id.

-----Original Message----- From: larsladfors@hotmail.com Sent: Monday, March 23, 2009 11:25 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Fo the same vtf_id I would like keep only one observation and

Vtf_Id varA 377765 K 377765 K 377765 v 388169 K 388169 V 388169 PN 388651 v 388651 v 388651 pn 388677 pn 388677 pn 388677 pn

there is hierachy for variable varA Fo the same vtf_id I would like keep only one observation and 1. if any of varA for that vtf_id is "K" i would like to keep that observation 2. if any of varA for that vtf_id is not "K" but "V" i would like to keep that observation 3. if no observation fot the same vtf_id is "V" or "K" then i would like to keep one with varA'"PN"

the new dataset shoul be like this: Vtf_Id varA 377765 K

388169 K

388651 v

388677 pn

Thanks!


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