[R] Odp: adding column to a matrix

From: Petr PIKAL <petr.pikal_at_precheza.cz>
Date: Tue, 01 May 2007 13:50:30 +0200


Hi

see ?ifelse

ifelse(censoring>survival, survival, censoring)

Regards

Petr
petr.pikal_at_precheza.cz

r-help-bounces_at_stat.math.ethz.ch napsal dne 01.05.2007 13:25:18:

> l have the following dataset and would like to calculate the actual
survival time by
> if censoring time > survival time then actual survival time =survival
time
> else its= censoring time.
> treatmentgrp strata censoringTime survivalTime censoring
 

> actualsurvivaltim
> [1,] 1 1 1.012159 1137.80922 0
> [2,] 2 2 32.971439 247.21786 0
> [3,] 2 1 85.758253 797.04949 0
> [4,] 1 1 16.999171 78.92309 0
>
> l used matrix to genarate the data
> thanks in advance
>
>
>
> ---------------------------------
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_stat.math.ethz.ch 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.



R-help_at_stat.math.ethz.ch 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 Tue 01 May 2007 - 17:42:00 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 Tue 01 May 2007 - 18:31:33 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.