Learn R Programming

popEpi (version 0.3.1)

as.data.table.ratetable: Coerce a ratetable Object to Class data.table

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

"as.data.table"(x, ...)

Arguments

x
a ratetable
...
other arguments passed on to as.data.table

See Also

ratetable, as.data.frame.ratetable

Examples

Run this code
library(relsurv)
data(slopop)
dt <- as.data.table(slopop)
dt

Run the code above in your browser using DataLab