data.frame
to a ratetable
objectCoerces a long-format data.frame
of population hazards
to an array, and in turn to a ratetable
,
which can be used in e.g. survival's expected survival computations
and relsurv's relative survival computations.
longDF2ratetable(DF, value.var = "haz", by.vars = setdiff(names(DF),
value.var))
a data.frame
name of values variable in quotes
names vector of variables by which to create (array) dimensions