On Fri, 18 Jan 2013, bibek sharma wrote:

I have a data set from a longitudinal study ( sample below) where subjects
are followed over time. Second column (status) contains info about if
subject is dead or still in the study and third column is time measured in
the week. Here is what I need: if status is not dead or unknown take the
last week, if status is dead or unknown I need to have corresponding week.

Desired resulst:

1       no      7
2       yes     5
3       Unknown 4

  Looks like a survival analysis situation. I know there are R packages for
this.

Rich

______________________________________________
R-help@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.

Reply via email to