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

Description Usage Arguments Author(s) See Also Examples

View source: R/utility_functions.R

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

1
2
## S3 method for class 'ratetable'
as.data.table(x, ...)

Arguments

x

a ratetable

...

other arguments passed on to as.data.table

Author(s)

Joonas Miettinen

See Also

ratetable, as.data.frame.ratetable

Examples

1
2
3
4
5
6
if (requireNamespace("relsurv", quietly = TRUE)) {
  library("data.table")
  data(slopop, package = "relsurv")
  dt <- as.data.table(slopop)
  dt
}

popEpi documentation built on May 29, 2017, 10:06 p.m.

Search within the popEpi package
Search all R packages, documentation and source code