s-news
[Top] [All Lists]

[S] Data Frame Subsetting Question

To: "'s-news@wubios.wustl.edu'" <s-news@wubios.wustl.edu>
Subject: [S] Data Frame Subsetting Question
From: "Humbolt, Allen" <HumboltA@kochind.com>
Date: Thu, 28 May 1998 16:52:23 -0500
Sender: owner-s-news@wubios.wustl.edu
I have a data frame with data like the following.
Class  A   B     Index
  1   16  17.43    1
  1   17  17.43    2
  1   18  17.43    3
  1   19  17.43    4
  2   17  18.02    5
  2   18  18.02    6
  2   19  18.02    7

My goal is to select the subset of this data frame where A is closest to B
within each class.  My desired result for the above data would be the
following.
Class  A   B     Index
  1   17  17.43    2
  2   18  18.02    6

Any suggestions for an easy way to do this?

Allen Humbolt
Quantitative Analyst
Koch Industries, Inc.
HumboltA@kochind.com
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>