From 270958007ec34a9bc8781def3748d756bc536ab0 Mon Sep 17 00:00:00 2001 From: Nat DeFries <42820733+nmdefries@users.noreply.github.com> Date: Thu, 20 Jun 2024 14:52:03 -0400 Subject: [PATCH] assign to dots using "assign" --- R/grouped_epi_archive.R | 5 ++++- R/slide.R | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/R/grouped_epi_archive.R b/R/grouped_epi_archive.R index 55a0176c..c6326751 100644 --- a/R/grouped_epi_archive.R +++ b/R/grouped_epi_archive.R @@ -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, ...) diff --git a/R/slide.R b/R/slide.R index 27a3135c..9d26174a 100644 --- a/R/slide.R +++ b/R/slide.R @@ -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, ...)