@@ -63,7 +63,7 @@ globalVariables(c(".", ".gaps"))
6363# ' # use fill() to fill `NA` by previous/next entry
6464# ' pedestrian %>%
6565# ' group_by_key() %>%
66- # ' fill_gaps() %>%
66+ # ' fill_gaps() %>%
6767# ' tidyr::fill(Count, .direction = "down")
6868fill_gaps <- function (.data , ... , .full = FALSE ) {
6969 UseMethod(" fill_gaps" )
@@ -95,7 +95,8 @@ fill_gaps.tbl_ts <- function(.data, ..., .full = FALSE) {
9595 }
9696 }
9797 grps <- groups(.data )
98- full_data <- group_by(bind_rows(as_tibble(gap_data ), .data ), !!! grps )
98+ full_data <- group_by(vec_rbind(as_tibble(gap_data ), as_tibble(.data )),
99+ !!! grps )
99100 full_data <- full_data [names(.data )] # keep the original order
100101 update_meta(full_data , .data , ordered = NULL , interval = interval(.data ))
101102}
@@ -326,7 +327,7 @@ unwrap <- function(.data, .col) {
326327 vec_seq_along(.data ), vapply(.data [[lst_col ]], vec_size , integer(1 ))
327328 )
328329 res <- vec_slice(res , row_indices )[setdiff(names(.data ), lst_col )]
329- vec_cbind(res , bind_rows (!!! .data [[lst_col ]]))
330+ vec_cbind(res , vec_rbind (!!! .data [[lst_col ]]))
330331}
331332
332333abort_invalid_full_arg <- function () {
0 commit comments