[R] Problem with tick marks in lines.survfit (package survival)
Robert Baer
rbaer at atsu.edu
Mon Sep 19 16:13:15 CEST 2005
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