Running examples in ‘tsibble-Ex.R’ failed
The error most likely occurred in:

> ### Name: fill_gaps
> ### Title: Turn implicit missing values into explicit missing values
> ### Aliases: fill_gaps
> 
> ### ** Examples
> 
> library(dplyr)

Attaching package: ‘dplyr’

The following object is masked from ‘package:tsibble’:

    id

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

> harvest <- tsibble(
+   year = c(2010, 2011, 2013, 2011, 2012, 2014),
+   fruit = rep(c("kiwi", "cherry"), each = 3),
+   kilo = sample(1:10, size = 6),
+   key = fruit, index = year
+ )
> 
> # gaps as default `NA`
> fill_gaps(harvest, .full = TRUE)
# A tsibble: 10 x 3 [1Y]
# Key:       fruit [2]
    year fruit   kilo
   <dbl> <chr>  <int>
 1  2010 cherry    NA
 2  2011 cherry     1
 3  2012 cherry     2
 4  2013 cherry    NA
 5  2014 cherry     5
 6  2010 kiwi       9
 7  2011 kiwi       4
 8  2012 kiwi      NA
 9  2013 kiwi       7
10  2014 kiwi      NA
> full_harvest <- fill_gaps(harvest, .full = FALSE)
> full_harvest
# A tsibble: 8 x 3 [1Y]
# Key:       fruit [2]
   year fruit   kilo
  <dbl> <chr>  <int>
1  2011 cherry     1
2  2012 cherry     2
3  2013 cherry    NA
4  2014 cherry     5
5  2010 kiwi       9
6  2011 kiwi       4
7  2012 kiwi      NA
8  2013 kiwi       7
> 
> # replace gaps with a specific value
> harvest %>%
+   fill_gaps(kilo = 0L)
# A tsibble: 8 x 3 [1Y]
# Key:       fruit [2]
   year fruit   kilo
  <dbl> <chr>  <int>
1  2011 cherry     1
2  2012 cherry     2
3  2013 cherry     0
4  2014 cherry     5
5  2010 kiwi       9
6  2011 kiwi       4
7  2012 kiwi       0
8  2013 kiwi       7
> 
> # replace gaps using a function by variable
> harvest %>%
+   fill_gaps(kilo = sum(kilo))
# A tsibble: 8 x 3 [1Y]
# Key:       fruit [2]
   year fruit   kilo
  <dbl> <chr>  <int>
1  2011 cherry     1
2  2012 cherry     2
3  2013 cherry    28
4  2014 cherry     5
5  2010 kiwi       9
6  2011 kiwi       4
7  2012 kiwi      28
8  2013 kiwi       7
> 
> # replace gaps using a function for each group
> harvest %>%
+   group_by_key() %>%
+   fill_gaps(kilo = sum(kilo))
Error: `vars` must be a character vector.
Backtrace:
     █
  1. └─harvest %>% group_by_key() %>% fill_gaps(kilo = sum(kilo))
  2.   ├─base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3.   └─base::eval(quote(`_fseq`(`_lhs`)), env, env)
  4.     └─base::eval(quote(`_fseq`(`_lhs`)), env, env)
  5.       └─`_fseq`(`_lhs`)
  6.         └─magrittr::freduce(value, `_function_list`)
  7.           ├─base::withVisible(function_list[[k]](value))
  8.           └─function_list[[k]](value)
  9.             ├─tsibble::fill_gaps(., kilo = sum(kilo))
 10.             └─tsibble:::fill_gaps.tbl_ts(., kilo = sum(kilo))
 11.               ├─dplyr::left_join(gap_data, replaced_df, by = by_name)
 12.               └─tsibble:::left_join.tbl_ts(gap_data, replaced_df, by = by_name)
 13.                 └─tsibble:::update_meta(...)
 14.                   └─tsibble:::retain_tsibble(new, key = key(old), index = index(old))
 15.               
Execution halted