A simple_ts is a simpler tsibble with index always being date

simple_ts(x, ..., round = c("days", "months", "years"), iso = FALSE)

Arguments

x

Date vector for day_ts index

...

Named vector of values for day_ts columns

round

character one of "days" (no rounding), "months" (from first day of min month to last of max month) and "year" (from Jan 1st min year to Dec 12 max year)

iso

logical

Value

tibble::tibble Object of class day_ts

Examples

simple_ts(c("2012-04-01", "2012-04-12", "2012-04-10"), value = 1:3, label = c("hello"))
#> # A tibble: 12 × 3
#>    date       value label
#>    <date>     <int> <chr>
#>  1 2012-04-01     1 hello
#>  2 2012-04-02    NA NA   
#>  3 2012-04-03    NA NA   
#>  4 2012-04-04    NA NA   
#>  5 2012-04-05    NA NA   
#>  6 2012-04-06    NA NA   
#>  7 2012-04-07    NA NA   
#>  8 2012-04-08    NA NA   
#>  9 2012-04-09    NA NA   
#> 10 2012-04-10     3 hello
#> 11 2012-04-11    NA NA   
#> 12 2012-04-12     2 hello