Hi dsgeek,
You were on the right track, and add_row can only add rows to completed tsibbles via piping and not during construction. In addition, you have to make sure that
you're adding the same data types.
library("tidyverse")
library("tsibble")
reprex1 <- tibble(
month.yeard = yearmonth(c('2020-03','2020-06')),
vol = c(20L, 30L)) %>%
add_row(month.yeard = yearmonth(c('2020-04', '2020-05')), vol = c(0L, 0L),
.after = 3)
reprex1
#> # A tibble: 4 x 2
#> month.yeard vol
#> <mth> <int>
#> 1 2020 Mar 20
#> 2 2020 Jun 30
#> 3 2020 Apr 0
#> 4 2020 May 0
Created on 2020-07-13 by the reprex package (v0.3.0)