On 09/02/12 10:00, David Winsemius wrote:

On Feb 8, 2012, at 3:50 PM, summer wrote:

Hi, there is p value and number of events from coxph results. How can I keep
record of every p value and number of events automatically if I run 100
times?

?replicate

Another question is how can I change the true or faulse statment to 1 and 0.
such as w=1<2, I want the value of w to be 1 not true.

That way lies madness.


Very likely; but if you want to go mad, madness is easily achieved.  Just
add 0:

    w <- 0+(1<2)

(Doing arithmetic on logical  vectors coerces them to numeric vectors
of zeroes and ones.)

    cheers,

            Rolf Turner

______________________________________________
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