Re: [R] select a subset

From: Stefan Grosse <>
Date: Mon, 24 Nov 2008 13:42:45 +0100

gallon li schrieb:
> for id 1, i want to select the last row since all censor indicator is 0; for
> id 2, i want to select the row where censor ==1; for id 3, i also want to
> select the row where censor==1. So if there is a 1 for censor, then I want
> to select such a row, otherwise I want to select the last obs. for this id.
> I am wondering if there is a quick way to solve this?

and please do read an introductionary text.... mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Mon 24 Nov 2008 - 12:48:29 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 24 Nov 2008 - 13:30:26 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive