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

Rachel Pearce pearce.rachel at gmail.com
Mon Sep 19 14:05:32 CEST 2005


Sorry, my previous email seems to have come through in a rather odd
format. Also I forgot to add version and OS information, now included
below. My original query was:

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

Here are the version data:

platform i386-pc-mingw32
arch     i386           
os       mingw32        
system   i386, mingw32  
status                  
major    2              
minor    1.1            
year     2005           
month    06             
day      20             
language R




More information about the R-help mailing list