[Rd] new behavior in model.response -- Solved

Therneau, Terry M., Ph.D. therne@u @ending from m@yo@edu
Thu Jun 28 21:47:45 CEST 2018


Thanks to multiple readers for comments and patience as I sorted this out.  I now have 
working length and names methods for Surv objects, which do not seem to break anything.   
I just ran the test suites for 471 packages that depend on survival, but I don't test 
against bioconductor so cannot speak to that corpus.

Essentially, if I wanted to think of  Surv(1:6, rep(1:0, 3)) = 1 2+ 3  4+ 5  6+ as a 
vector of length 6, although stored in a longer representation, I needed to
   a. add a length method
   b. add names and names<- methods
   c. But, the names method cannot create a length=6 names attribute.  Handling of a names 
attribute is baked into the low-level code, and that code treats number of elements as the 
length, no matter what you say.
   d. The solution was to make names.Surv store the results in the rownames.

Terry T.


	[[alternative HTML version deleted]]



More information about the R-devel mailing list