[R] using survfit
dwinsemius at comcast.net
Tue Oct 30 01:14:49 CET 2007
raymond chiruka wrote:
> when i use plot.survfit to plot more than one graph why I only see the last graph how do i see the other graphs.for example
> a11=4;a12=4 ;a21=4 ;a22=4
> time=matrix(c(time11, time12, time21, time22))
My version of R (2.4.1 on a WindozeXP machine) had problems with the
"smart-quotes" when cut and pasted but I cannot be sure that was not a
problem induced by Thunderbird.
> plot(d2, lty=2:3, fun="cumhaz",
> xlab="Months", ylab="Cumulative Hazard")
It plotted just fine. And you then over-wrote it with the second plot.
You could save (temporarily) a screen plot with
### then make another plot, save it too.
### then use
You could also save to a file and view in an external viewer. The format
of recorded plots is not guaranteed to be the same from version to version.
Another option (which would be machine specific and assuming a Windows
device) would be to open second screen window with:
> win.graph(width = 7, height = 7, pointsize = 12, restoreConsole = FALSE)
> plot(d1, lty=2:3,
> xlab="Months", ylab="survival curves")
> I only see the plot of d1 what happens to d2 and how do l view it.
If you opened a new device before each plot you could paper your screen
More information about the R-help