Learn R Programming

popEpi (version 0.2.1)

as.data.frame.ratetable: Coerce a ratetable object to data.frame

Description

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.

Usage

## S3 method for class 'ratetable':
as.data.frame(x, ...)

Arguments

x
a ratetable
...
unused but added for compatibility with as.data.frame

See Also

ratetable, as.data.table.ratetable

Examples

Run this code
library(relsurv)
data(slopop)
df <- as.data.frame.ratetable(slopop)
head(df)

Run the code above in your browser using DataLab