[R] tick marks: 0, 12, 24, 36 ...

Gabor Borgulya borgulya at gyer2.sote.hu
Mon Oct 6 17:54:13 CEST 2003


Dear R-help list,

I have a problem with the tick marks of a Kaplan-Meier survival plot.
Here is a sample:

follow.up<-c(10,20,30,40,50,60,70,80,90,100) #months
dead<-c(1,1,1,0,1,1,0,0,0,0)
KM <-survfit(Surv(follow.up, dead))
plot(KM)

The result is a nice plot. However, our research group thinks it may be
a better idea to place the ticks to the years on the time scale, i.e. 0,
12, 24, 36 etc. months. Is this possible with R?

I tried to look it up and the most relevant manual page was ?axis,
option at - but I could not make this work together with the plot
command. 

plot(KM, axis=axis(1, at=c(0,12,24,36))) #this does not what I wanted

Any ideas?


Thank you,

Gabor




More information about the R-help mailing list