View source: R/as.data.table.R
as.data.table.incidence2 | R Documentation |
Coerce to a data.table
## S3 method for class 'incidence2'
as.data.table(x, keep.rownames, ...)
x |
An incidence2 object. |
keep.rownames |
Not used. |
... |
Passed to other methods. |
A data.table of the original input but with no additional attributes.
data.table::as.data.table for the underlying generic.
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.