Re: [Rd] new behavior in model.response

2018-06-27 Thread Berry, Charles
> On Jun 27, 2018, at 3:58 PM, Achim Zeileis wrote: > > On Thu, 28 Jun 2018, Therneau, Terry M., Ph.D. via R-devel wrote: > >> I now understand the issue, which leads to a different and deeper issue >> which is "how to assign a proper length to Surv objects". >> >> > Surv(c(1,2,3), c(1,0,1)

Re: [Rd] new behavior in model.response

2018-06-27 Thread Achim Zeileis
On Thu, 28 Jun 2018, Therneau, Terry M., Ph.D. via R-devel wrote: I now understand the issue, which leads to a different and deeper issue which is "how to assign a proper length to Surv objects". > Surv(c(1,2,3), c(1,0,1)) [1] 1  2+ 3 The above prints as 3 elements and is conceptually 3 eleme

Re: [Rd] new behavior in model.response

2018-06-27 Thread Therneau, Terry M., Ph.D. via R-devel
I now understand the issue, which leads to a different and deeper issue which is "how to assign a proper length to Surv objects". > Surv(c(1,2,3), c(1,0,1)) [1] 1  2+ 3 The above prints as 3 elements and is conceptually 3 elements. But if I give it length method to return a 3 then I need a n

Re: [Rd] new behavior of model.response

2018-06-27 Thread Therneau, Terry M., Ph.D. via R-devel
Charles Berry pointed out an error in my reasoning.   In the current survival I forgot the S3method line for length in the NAMESPACE file, so the behavior is really not new.  Nonetheless it remains surprising and non-intuitive.  Why does model.response sometimes attach spurious names, when th

[Rd] new behavior of model.response

2018-06-27 Thread Therneau, Terry M., Ph.D. via R-devel
I am getting some unexplained changes in the latest version of survival, and finally traced it down to this: model.response acts differently for Surv objects. Here is a closed form example using a made up class Durv = diagnose survival.   I tracked it down by removing methods one by one from Su