Re: [R] Kaplan Meier function

From: Matthias Gondan <>
Date: Thu, 14 Feb 2008 16:14:23 +0100

Frank E Harrell Jr schrieb:

> Matthias Gondan wrote:

>>> data(colon)
>>> s = survfit(Surv(time, status) ~ rx, data=colon)
>>> plot(s)
>>> plot(s, col=1:3)
>> By the way: Does anyone know a neat way to indicate the number of
>> patients under risk in
>> the curve?
> That's one of many options in the survplot function in the Design > package, which uses the survival package.

Ah, thanks! Nice.

s = survfit(Surv(time, status) ~ rx, data=colon) survplot(s, n.risk=TRUE, conf='none',

Is there an option for drawing small vertical lines if a patient has been censored?

Best wishes,

Matthias mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 14 Feb 2008 - 15:18:03 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 Thu 14 Feb 2008 - 18:30:13 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive