[Rd] A model pass-through function

Terry Therneau therneau at mayo.edu
Sun Jan 18 14:57:55 CET 2009


 I've found 'pass-through' functions to be useful in the survival library.
For example
	cluster <- function(x) x

This allows the coxph routine to use the specials attribute of the terms
structure to spot variables that should be treated specially, with
needing to create a special class.

  I'm updating the expected survival routines to be more open minded wrt dates,
i.e., no longer wedded to my old 'date' class, and the following would
work very nicely
	ratetable <- function(...) data.frame(...)

Then later steps in the processing can make sure that variables in a rate
table which are known to be dates, like 'year' in the US death tables, can
take special care when matching them to the user's data.  

 Nice idea, except that it doesn't work: model.frame appears to be unhappy
with any multi-column object except a matrix.  Any suggestions to work around
this?

	Terry Therneau



More information about the R-devel mailing list