Re: [R] Sorting Surv objects

2015-02-14 Thread Professor Bickis
Thanks for the quick response. My work-around was suggested as a quick fix for right-censored data, not as a general sort method for censored data. My concern was that sort does not work on right-censored data as described in the xtfrm documentation. Mik Bickis On Feb 13, 2015, at 05:53

Re: [R] Sorting Surv objects

2015-02-13 Thread Therneau, Terry M., Ph.D.
Your work around is not as easy looking to me. Survival times come in multiple flavors: left censored, right censored, interval censored, left-truncated and right censored, and multi-state. Can you give me guidance on how each of these should sort? If a sort method is added to the package it

Re: [R] Sorting Surv objects

2015-02-12 Thread Prof Brian Ripley
On 12/02/2015 16:26, Professor Bickis wrote: It seems that Surv objects do not sort correctly. This seems to be a bug. Anyone else found this? This is presumably about Surv() from package survival, not mentioned. There was a bug, corrected in R-devel (and I will port to R-patched before

[R] Sorting Surv objects

2015-02-12 Thread Professor Bickis
It seems that Surv objects do not sort correctly. This seems to be a bug. Anyone else found this? survival.data [1] 4+ 3 1+ 2 5+ class(survival.data) [1] Surv sort(survival.data) [1] 2 1+ 4+ 3 5+ An easy work-around is to define a function sort.Surv

[R] Sorting Surv objects

2015-02-12 Thread Professor Bickis
It seems that Surv objects do not sort correctly. This seems to be a bug. Anyone else found this? survival.data [1] 4+ 3 1+ 2 5+ class(survival.data) [1] Surv sort(survival.data) [1] 2 1+ 4+ 3 5+ An easy work-around is to define a function sort.Surv