as.data.table.incidence2 {incidence2} | R 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)
}
[Package incidence2 version 2.3.1 Index]