Skip to content

Commit 3d907de

Browse files
committed
fixed count_gaps() warning due to dplyr change
closes #295
1 parent 5f23d9b commit 3d907de

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Depends:
3838
R (>= 3.2.0)
3939
Imports:
4040
anytime (>= 0.3.1),
41-
dplyr (>= 1.0.0),
41+
dplyr (>= 1.1.0),
4242
ellipsis (>= 0.3.0),
4343
generics,
4444
lifecycle,

NAMESPACE

+1
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ importFrom(dplyr,left_join)
361361
importFrom(dplyr,mutate)
362362
importFrom(dplyr,new_grouped_df)
363363
importFrom(dplyr,pull)
364+
importFrom(dplyr,reframe)
364365
importFrom(dplyr,rename)
365366
importFrom(dplyr,right_join)
366367
importFrom(dplyr,select)

NEWS.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# tsibble 1.1.4
22

33
* Fixed `vec_ptype2()` for `yearweek` and `yearquarter` for non-default week start. (#299)
4+
* Fixed `count_gaps()` warning message due to dplyr deprecation in favour of `reframe()`. (#295)
45

56
# tsibble 1.1.3
67

R/gaps.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ count_gaps <- function(.data, .full = FALSE, .name = c(".from", ".to", ".n"),
232232

233233
idx_full <- seq_generator(.data[[as_string(idx)]], int)
234234
grped_tbl <- new_grouped_df(gap_data, groups = key_data(gap_data))
235-
lst_out <- summarise(grped_tbl,
235+
lst_out <- reframe(grped_tbl,
236236
!!".gaps" := tbl_gaps(!!idx, idx_full, .name = .name))
237237

238238
vec_cbind(lst_out[key_vars(.data)], vec_cbind(!!!lst_out$.gaps))
@@ -342,7 +342,7 @@ seq_generator <- function(x, time_units = NULL, length_out = NULL) {
342342
if (time_units == 0) return(x)
343343

344344
min_x <- min(x)
345-
seq_call <- quote(seq(from = min_x, to = max(x), by = time_units,
345+
seq_call <- quote(seq(from = min_x, to = max(x), by = time_units,
346346
length.out = length_out))
347347
if (!is.null(length_out)) {
348348
seq_call <- call_modify(seq_call, to = zap())

R/tsibble-package.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
#' @importFrom dplyr group_by ungroup group_data grouped_df group_vars
8686
#' @importFrom dplyr group_rows groups new_grouped_df is_grouped_df
8787
#' @importFrom dplyr left_join right_join full_join inner_join anti_join
88-
#' @importFrom dplyr bind_rows bind_cols combine with_order pull first
88+
#' @importFrom dplyr bind_rows bind_cols combine with_order pull first reframe
8989
#' @importFrom dplyr dplyr_row_slice dplyr_col_modify dplyr_reconstruct
9090
#' @importFrom tibble new_tibble trunc_mat
9191
#' @import rlang tidyselect vctrs ellipsis

0 commit comments

Comments
 (0)