s-news
[Top] [All Lists]

Re: observation number

To: borek@igf.edu.pl
Subject: Re: observation number
From: Spencer Graves <spencer.graves@PDF.COM>
Date: Tue, 17 Jun 2003 06:17:15 -0700
Cc: s-news@lists.biostat.wustl.edu
References: <3EEF1345.5060900@igf.edu.pl>
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02
have you considered "which"?

Janusz Borkowski wrote:

Dear S+ users,
I have a data frame in which the first column indicates the day number, the second column observation number and the third results of observations. It may look like:
Dn    On    R1
1    1    3
1    2    4
1    3    5
2    4    6
2    5    7
2    6    8
To find minimum value of R1 for each day is easy:
min.valR1<-Tapply(R1,Dn,min)
but how can I get not only the vector of minimum values, but also a vector of observation numbers for which the minimum occurred I am using S+ 4.5 for Windows.
I will appreciate any advice.
Janusz Borkowski



--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news



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