[Rd] Odd behavior of plot function
Therneau, Terry M., Ph.D.
therneau at mayo.edu
Thu Jun 11 22:25:25 CEST 2015
Sorry, that's a cut and paste error. It should be either tempx or xtemp throughout.
On 06/11/2015 12:59 PM, John Nolan wrote:
> Is there a misprint in your example? The first line of code uses tempx, but the rest uses a different variable xtemp?
> -----"R-devel" <r-devel-bounces at r-project.org> wrote: -----
> To: "r-devel at r-project.org" <r-devel at r-project.org>
> From: "Therneau, Terry M., Ph.D."
> Sent by: "R-devel"
> Date: 06/11/2015 12:50PM
> Subject: [Rd] Odd behavior of plot function
> The following code snippet taken from plot.survfit now gives me a surprising result:
> tempx <- c(0, 400, 0, 0)
> ytemp <- c(.0657, .98, 1, 0)
> plot(range(xtemp), range(ytemp), log='y', type='n')
> In that the max value for the x axis is now 10. The 0 on the end of ytemp was actually a
> mistake and shouldn't be there, if you remove it then the upper limit is sensible.
> plot(range(xtemp), range(ytemp[1:3]), log='y', type='n')
> I've now fixed this in the survival package. I can't say when the odd behavior crept in,
> but am sure it was not always there. I draw log scale plots only a few times a year.
> Terry T.
> R-devel at r-project.org mailing list
More information about the R-devel