[S] Selecting arbitrary subsets from data frames

Paul Schwarz (Paul.Schwarz@cornell.edu)
Thu, 28 May 1998 14:01:38 -0400


I have a data frame containing records from individual sampling units which
are also coded by which transect they came from. So there are multiple
sampling units per transect. I'd like to select arbitrary subsets of the
data based on the transect number. For example, if the transects are
numbered from 1 through 10, I'd like to be able to select all data for
transects 2,3,7,8,9. I've tried using the transect number as the names
attribute, but only the first instance of a record with the corresponding
transect number is returned when I try to extract the data, e.g., data[
c('2','3','7','8','9') ].

So, how can I do this?

Many thanks!

-Paul

Cornell University
Department of Natural Resources
Fernow Hall
Ithaca, New York 14853-3001

607-255-1067 (phone)
607-255-0349 (fax)

Paul.Schwarz@Cornell.EDU (e-mail)

-----------------------------------------------------------------------
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