[R] Problem with tick marks in lines.survfit (package survival)

Rachel Pearce pearce.rachel at gmail.com
Mon Sep 19 16:22:40 CEST 2005

Sorry, yes I think that would work, for the example I gave, but I am
trying to superimpose a curve onto an existing plot. The option of
using "plot" to draw both curves is not available, since the data are
(or were) in two different columns. For that reason I was trying to
use "lines" for the second curve.

I used the example given with the package so that I didn't have to
publish my own data (which are not mine to publish, if you see what I

I have now given up and created a new data frame with OS and PFS
stacked on top of each other, but this is a very time-consuming

Do you (or anyone) know how to make "lines.survfit" draw tick marks?


On 19/09/05, Robert Baer <rbaer at atsu.edu> wrote:
> How about:
> plot(fit, mark.time=TRUE, xscale=365.24,xlab='Years',
> ylab='Survival',lwd=c(2,1))
> Rob
> ----- Original Message -----
> From: "Rachel Pearce" <pearce.rachel at gmail.com>
> To: <r-help at stat.math.ethz.ch>
> Sent: Monday, September 19, 2005 4:59 AM
> Subject: [R] Problem with tick marks in lines.survfit (package survival)
> > I have attempted to follow posting guidelines but I have failed to find
> out
> > what I am doing wrong here.
> >  I am trying to use lines.survfit to plot a second curve onto a survival
> > curve produced by plot.survfit. In my case this is to be a progression
> free
> > survival curve superimposed upon an overall survival curve, but I will
> > illustrate my problem using the example given in the help for
> lines.survfit.
> >  I would like to have tick marks for censored data points on both curves,
> so
> > I would like to do something like:
> >  > fit <- survfit(Surv(time, status) ~ sex, pbc,subset=1:312)
> > > plot(fit[2], mark.time=TRUE, xscale=365.24,
> > + xlab='Years', ylab='Survival')
> > > lines(fit[1], lwd=2, xscale=365.24, mark.time=TRUE)
> >  but when I do this, no tick marks appear on the second curve. Can anyone
> > see what I am doing wrong here?
> >  Rachel
> >
> > [[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
> >

More information about the R-help mailing list