Learn R Programming

popEpi (version 0.4.3)

as.data.frame.ratetable: Coerce a ratetable Object to Class 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 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
# 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