Re: [R] survival curve for only certain values of a factor

From: Dieter Menne <>
Date: Thu, 13 Mar 2008 07:20:44 +0000 (UTC)

Chang Liu <changisme <at>> writes:

> data(aml)
> If I use instead dummy variables:
> aml$x1 = (aml$x=="maintained")aml$x2 = (aml$x=="unmaintained")
> and I want to plot the survival curve using x1, x2, and I just want the 2
levels, rather than 4 curves from:

I don's understand what you want, but the first step is definitively incorrect apart from the missint line break. The levels of aml are


so both your "==" lead to all-false levels.

Dieter mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 13 Mar 2008 - 07:26:12 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 13 Mar 2008 - 09:30:21 GMT.

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

list of date sections of archive