Skip to content

Commit 49a2d08

Browse files
committed
Go back to .by in the generic of fill()
1 parent ac51fe3 commit 49a2d08

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

R/fill.R

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@
1212
#' boundaries. This can also be accomplished using the `.by` argument to
1313
#' `fill()`, which creates a temporary grouping for just this operation.
1414
#'
15+
#' @inheritParams dplyr::mutate
16+
#'
1517
#' @param data A data frame.
1618
#' @param ... <[`tidy-select`][tidyr_tidy_select]> Columns to fill.
1719
#' @param .direction Direction in which to fill missing values. Currently
1820
#' either "down" (the default), "up", "downup" (i.e. first down and then up)
1921
#' or "updown" (first up and then down).
22+
#'
2023
#' @export
2124
#' @examples
2225
#' # direction = "down" --------------------------------------------------------
@@ -97,20 +100,17 @@
97100
#' dplyr::ungroup()
98101
fill <- function(data,
99102
...,
103+
.by = NULL,
100104
.direction = c("down", "up", "downup", "updown")) {
105+
check_dots_unnamed()
101106
UseMethod("fill")
102107
}
103108

104-
#' @inheritParams dplyr::mutate
105-
#' @rdname fill
106109
#' @export
107110
fill.data.frame <- function(data,
108111
...,
109-
.direction = c("down", "up", "downup", "updown"),
110-
.by = NULL) {
111-
# Must be here rather than in the generic due to the placement of `.by`
112-
check_dots_unnamed()
113-
112+
.by = NULL,
113+
.direction = c("down", "up", "downup", "updown")) {
114114
vars <- names(tidyselect::eval_select(
115115
expr = expr(c(...)),
116116
data = data,

man/fill.Rd

+5-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)