ratetable
Object to Class data.frame
ratatable
objects used in e.g. survival and relsurv
can be conveniently coerced to a long-format data.frame
.
However, the names and levels of variables in the result
may not match names and levels of variables in your data.
# S3 method for ratetable
as.data.frame(x, ...)
a ratetable
unused but added for compatibility with as.data.frame
# NOT RUN {
if (requireNamespace("relsurv", quietly = TRUE)) {
data(slopop, package = "relsurv")
df <- as.data.frame(slopop)
head(df)
}
# }
Run the code above in your browser using DataLab