Many thanks,
truly a simple and elegant solution!
Caroline
On Sun, Sep 13, 2009 at 12:08 AM, David Winsemius
wrote:
>
> On Sep 12, 2009, at 11:36 AM, caroline choong wrote:
>
>> Dear all,
>> I have a data set as follows:
>>
>> ID cycle.number cycle.result
>> 1 2525
On Sep 12, 2009, at 11:36 AM, caroline choong wrote:
Dear all,
I have a data set as follows:
ID cycle.number cycle.result
1 2525 1 38
2 2525 2 38
3 2525 3
Try this:
If cycle.number is ordered:
do.call(rbind, lapply(split(x, x$ID), tail, 1))
On Sat, Sep 12, 2009 at 12:36 PM, caroline choong wrote:
> Dear all,
> I have a data set as follows:
>
> ID cycle.number cycle.result
> 1 2525 1
Dear all,
I have a data set as follows:
ID cycle.number cycle.result
1 2525 1 38
2 2525 2 38
3 2525 3 25
4 2525 4
4 matches
Mail list logo