Message-ID: <4F32E81F.60205@xtra.co.nz>
Date: 2012-02-08T21:24:47Z
From: Rolf Turner
Subject: How to store the p value and number of events into a matrix
In-Reply-To: <40904117-9278-40A1-97F2-1C840B2C9516@comcast.net>
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