What did the maintainer say? (This is in a contributed package survival,
see the posting guide.)
The help page says
fit <- survfit(Surv(time, status) ~ sex, pbc,subset=1:312)
plot(fit, mark.time=FALSE, xscale=365.24,
xlab='Years', ylab='Survival')
lines(fit[1], lwd=2, xscale=365.24) #darken the first curve and add
marks
and no marks appear.
It looks to me as if the problem is that the code has e.g.
deaths <- c(-1, ssurv$n.event[who])
and ssurv is a vector. I think that should be x$n.event (in two places).
On Fri, 19 May 2006, Rachel Pearce wrote:
> I posted several months about the problem with adding tick marks to curves
> using lines.survfit.
>
> This occurs when lines.survfit is used to add a curve to survival curves
> plotted with plot.survfit. The help for this function implies that
> mark.time=TRUE thus:
>
>
plot(pfsfit,conf.int=FALSE,xscale=365.25,yscale=100,xlab="Years",ylab="%
> surviving",lty=2,mark=3)
> lines(osfit,mark=3,col=1,lty=1,xscale=365.24,mark.time=TRUE)
>
> will add tick marks to the added curve in the same way that they appear on
> the first curve, but no permutation of mark, col, lty, etc. seems to
produce
> tick marks. Has anyone found a solution to this problem?
>
> Rachel
>
> British Society of Blood and Marrow Transplantation
>
> [[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
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595