This is a design question for R-core and/or CRAN folks. I think I know what
the answer will be, but I thought I would ask.
The plot.survfit and lines.survfit functions have an "xmax" argument. The
result of this is to truncate curves at the given time value, something we
often want to do. The result of xmax is more pleasing than using xlim: since
it truncates the data before plotting, lines do not 'run into' the right hand
side of the bounding box. Plus one avoids any warning messages about data
outside the limits.
When using plot then lines, it would be nice if an xmax argument from the plot
call was remembered for the subsequent lines() call. I added an experimental
way to do this a few years ago and it seems to work, but never documented it.
I recently ran into it looking at the code and should do one or the other:
document or remove.
What the code does is that plot.survfit sets a global "plot.survfit" option
using options(), which contains this information, and lines.survfit uses that
as a default if xmax is not specified.
Like I said, it works as intended, but leaving things on the global options
list seems untidy, especially since it will persist until the end of the
session (or next plot.survfit call). On the other hand, I can't imagine any
conflict with my chosen name. At one time I thought there might be other
things I want to persist (the plot.survfit option is itself a list), but
nothing has come up in the 5 or so years since I created this.
Document or delete?
Terry
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel