Small data set referencing the current date
Arguments
- n
number of rows to return
- by
string indicating the unit of time between dates in
seq.Date(..., by = )
Examples
demo_data()
#> # A tibble: 10 × 5
#> group sales count on_sale date
#> <chr> <dbl> <dbl> <dbl> <date>
#> 1 a 101 35 1 2022-12-19
#> 2 a 102 34 0 2022-10-19
#> 3 b 103 33 1 2022-08-19
#> 4 b 104 32 0 2022-06-19
#> 5 c 105 31 1 2022-04-19
#> 6 c 106 30 0 2022-02-19
#> 7 d 107 29 1 2021-12-19
#> 8 d 108 28 0 2021-10-19
#> 9 e 109 27 1 2021-08-19
#> 10 e 110 26 0 2021-06-19
demo_data(n = 8, by = "1 day")
#> # A tibble: 8 × 5
#> group sales count on_sale date
#> <chr> <dbl> <dbl> <dbl> <date>
#> 1 a 101 33 1 2022-12-19
#> 2 a 102 32 0 2022-12-20
#> 3 b 103 31 1 2022-12-21
#> 4 b 104 30 0 2022-12-22
#> 5 c 105 29 1 2022-12-23
#> 6 c 106 28 0 2022-12-24
#> 7 d 107 27 1 2022-12-25
#> 8 d 108 26 0 2022-12-26