as.data.table.incidence2: Coerce to a data.table

View source: R/as.data.table.R

as.data.table.incidence2R Documentation

Coerce to a data.table

Description

Coerce to a data.table

Usage

## S3 method for class 'incidence2'
as.data.table(x, keep.rownames, ...)

Arguments

x

An incidence2 object.

keep.rownames

Not used.

...

Passed to other methods.

Value

A data.table of the original input but with no additional attributes.

See Also

data.table::as.data.table for the underlying generic.

Examples


if (requireNamespace("outbreaks", quietly = TRUE)) {
    data(ebola_sim_clean, package = "outbreaks")
    dat <- ebola_sim_clean$linelist
    x <- incidence(dat, "date_of_onset")
    as.data.table(x)
}



incidence2 documentation built on June 22, 2024, 11:05 a.m.