Printing of <incidence2>
objects is handled via the pillar package.
Usage
# S3 method for incidence2
print(x, ...)
Arguments
- x
<incidence2>
object.- ...
Additional arguments passed through to
pillar::tbl_format_setup()
.
Examples
if (requireNamespace("outbreaks", quietly = TRUE)) {
withAutoprint({
data(ebola_sim_clean, package = "outbreaks")
dat <- ebola_sim_clean$linelist
(out <- incidence(dat, "date_of_onset"))
# use `n` to print more lines
print(out, n = 20L)
})
}
#> > data(ebola_sim_clean, package = "outbreaks")
#> > dat <- ebola_sim_clean$linelist
#> > (out <- incidence(dat, "date_of_onset"))
#> # incidence: 367 x 3
#> # count vars: date_of_onset
#> date_index count_variable count
#> * <date> <chr> <int>
#> 1 2014-04-07 date_of_onset 1
#> 2 2014-04-15 date_of_onset 1
#> 3 2014-04-21 date_of_onset 2
#> 4 2014-04-25 date_of_onset 1
#> 5 2014-04-26 date_of_onset 1
#> 6 2014-04-27 date_of_onset 1
#> 7 2014-05-01 date_of_onset 2
#> 8 2014-05-03 date_of_onset 1
#> 9 2014-05-04 date_of_onset 1
#> 10 2014-05-05 date_of_onset 1
#> # ℹ 357 more rows
#> > print(out, n = 20L)
#> # incidence: 367 x 3
#> # count vars: date_of_onset
#> date_index count_variable count
#> * <date> <chr> <int>
#> 1 2014-04-07 date_of_onset 1
#> 2 2014-04-15 date_of_onset 1
#> 3 2014-04-21 date_of_onset 2
#> 4 2014-04-25 date_of_onset 1
#> 5 2014-04-26 date_of_onset 1
#> 6 2014-04-27 date_of_onset 1
#> 7 2014-05-01 date_of_onset 2
#> 8 2014-05-03 date_of_onset 1
#> 9 2014-05-04 date_of_onset 1
#> 10 2014-05-05 date_of_onset 1
#> 11 2014-05-06 date_of_onset 3
#> 12 2014-05-07 date_of_onset 2
#> 13 2014-05-08 date_of_onset 2
#> 14 2014-05-09 date_of_onset 2
#> 15 2014-05-10 date_of_onset 1
#> 16 2014-05-11 date_of_onset 1
#> 17 2014-05-12 date_of_onset 3
#> 18 2014-05-13 date_of_onset 3
#> 19 2014-05-14 date_of_onset 3
#> 20 2014-05-16 date_of_onset 2
#> # ℹ 347 more rows