Re: [R] select a subset

From: Stefan Grosse <singularitaet_at_gmx.net>
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?
>
?subset

and please do read an introductionary text....



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html 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 https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive