Skip to content

Commit 1acd8d3

Browse files
committed
more pipe removal
1 parent 4ac3980 commit 1acd8d3

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

R/grouped_epi_archive.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,9 @@ grouped_epi_archive =
380380
)
381381
})
382382
# Combine output into a single tibble
383-
x <- as_tibble(setDF(rbindlist(x))) %>%
384-
# Reconstruct groups
385-
group_by(!!!syms(private$vars), .drop=private$drop)
383+
x <- as_tibble(setDF(rbindlist(x)))
384+
# Reconstruct groups
385+
x <- group_by(x, !!!syms(private$vars), .drop=private$drop)
386386

387387
# Unchop/unnest if we need to
388388
if (!as_list_col) {

R/slide.R

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,7 @@ epi_slide = function(x, f, ..., before, after, ref_time_values,
300300
# Count the number of appearances of each reference time value (these
301301
# appearances should all be real for now, but if we allow ref time values
302302
# outside of .data_group's time values):
303-
counts = .data_group %>%
304-
dplyr::filter(.data$time_value %in% time_values) %>%
303+
counts = dplyr::filter(.data_group, .data$time_value %in% time_values) %>%
305304
dplyr::count(.data$time_value) %>%
306305
dplyr::pull(n)
307306

@@ -375,8 +374,7 @@ epi_slide = function(x, f, ..., before, after, ref_time_values,
375374
.x$.real <- NULL
376375
f(.x, .group_key, .ref_time_value, ...)
377376
}
378-
x = x %>%
379-
group_modify(slide_one_grp,
377+
x = group_modify(x, slide_one_grp,
380378
f = f_wrapper, ...,
381379
starts = starts,
382380
stops = stops,

0 commit comments

Comments
 (0)