[R] Changelog for the survival package

Heinz Tuechler tuechler at gmx.at
Thu May 21 23:08:54 CEST 2009


Dear Terry,

first of all, thank you for your immense work. At the moment, I don't 
have a small reproducible example for the ratetable difficulty I 
have. I will work on it. Maybe the error message I get is of some 
information to you.

Error in match.ratetable(m[, rate], ratetable) :
   Data has a date type variable, but the reference ratetable is not 
a date for variable year

If I want to make str(survexp.ode) that is my ratetable, I get:
str(survexp.ode)
Error in `[.ratetable`(object, seq_len(iv.len)) : Invalid subscript
The same, however, is possible in version 2.34-1^

Try:
str(survexp.us)
Error in `[.ratetable`(object, seq_len(iv.len)) : Invalid subscript

But with unclass() it works
str(unclass(survexp.us))
  num [1:113, 1:2, 1:65] 1.58e-02 1.87e-03 3.01e-04 6.05e-05 1.52e-05 ...
  - attr(*, "dimnames")=List of 3
   ..$ : chr [1:113] "0-1d" "1-7d" "7-28d" "28-365d" ...
   ..$ : chr [1:2] "male" "female"
   ..$ : chr [1:65] "1940" "1941" "1942" "1943" ...
  - attr(*, "dimid")= chr [1:3] "age" "sex" "year"
  - attr(*, "type")= num [1:3] 2 1 4
  - attr(*, "cutpoints")=List of 3
   ..$ : num [1:113] 0 1 7 28 365 ...
   ..$ : NULL
   ..$ : int [1:65] -7305 -6939 -6574 -6209 -5844 -5478 -5113 -4748 
-4383 -4017 ...
  - attr(*, "summary")=function (R)
 >

Concerning the legend, I fully aggree with you. It's just that I have 
several syntax files, where I made use of the legend parameters and 
so I noted the change. For these files I rebuilt your old plot.survfit().

Further I appreciate your new function survmean(). At the moment it 
seems to be intended as internal, and not documented in the help. 
Still, I use it to get the old form of the output and to get the 
output as an object. I think, with only right censored data, n.max 
and n.start are not informative.

To underline, I appreciate your changes, it's only a little difficult 
to recognize them correctly by trial and error.

Thanks,
Heinz

At 18:57 21.05.2009, Terry Therneau wrote:
> >  Several changes in print.survfit, plot.survfit and seemingly in 
> the structure
> > of ratetabels effect some of my syntax files.
> > Is there somewhere a documentation of these changes, besides the 
> code itself?
>
>  I agree, the Changelog.09 file is not as comprehensive as one would like.
>Specific comments:
>
>  1. The ratetables were recently changed to accomodate a new 
> option.  I thought
>that I had made them completely backwards compatable with the old -- 
>please let
>me know specifics if I overlooked something.
>   The routines that make use of the rate tables can now use 
> multiple date types,
>but they still support the older 'date' class.
>
>   2. My local code and the R code had gotton badly out of sync, I spent a
>substantial fraction of my evenings re-merging them for over a 
>year.  2/3 of the
>changes were disjoint improvments in the two trees, these were easy 
>to merge.
>The hardest were survfit and its print/plot methods and some summary methods,
>where both of us had worked towards the same goal but in not quite 
>the same way.
>   I had made 3x as many updates to survfit as the R tree, so used 
> my (Mayo) code
>as the base, almost all the others stayed closer to the R side.
>   Feel free to ask me direct questions about any feature or change.  I can't
>necessarily promise fast resolution, but will try.
>
>   3. I don't understand putting legend or title options into a plot method,
>since a separate call after the plot is so much more flexible.  They 
>got pushed
>to the bottom of my change list, and then completely forgotton.
>
>   4. In the last few weeks issues with anova.coxph, and
>predict.coxph/factors/newdata were raised.  The fixes were added to 
>Rforge last
>night, and include 2 new test cases to avoid future mishaps.
>
>    Terry T.
>
>




More information about the R-help mailing list