Skip to content

Commit

Permalink
assign to dots using "assign"
Browse files Browse the repository at this point in the history
  • Loading branch information
nmdefries committed Jun 20, 2024
1 parent 7fd2119 commit 2709580
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion R/grouped_epi_archive.R
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,10 @@ epix_slide.grouped_epi_archive <- function(x, f, ..., before, ref_time_values,

f <- quos[[1]]
new_col <- sym(names(rlang::quos_auto_name(quos)))
... <- missing_arg() # nolint: object_usage_linter. magic value that passes zero args as dots in calls below
# Magic value that passes zero args as dots in calls below. Equivalent to
# `... <- missing_arg()`, but use `assign` to avoid warning about
# improper use of dots.
assign("...", missing_arg())
}

f <- as_slide_computation(f, ...)
Expand Down
5 changes: 4 additions & 1 deletion R/slide.R
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,10 @@ epi_slide <- function(x, f, ..., before, after, ref_time_values,

f <- quos[[1]]
new_col <- sym(names(rlang::quos_auto_name(quos)))
... <- missing_arg() # magic value that passes zero args as dots in calls below # nolint: object_usage_linter
# Magic value that passes zero args as dots in calls below. Equivalent to
# `... <- missing_arg()`, but use `assign` to avoid warning about
# improper use of dots.
assign("...", missing_arg())
}

f <- as_slide_computation(f, ...)
Expand Down

0 comments on commit 2709580

Please sign in to comment.