From 271aaaa8974451db20896d104fa21e686ddcebb8 Mon Sep 17 00:00:00 2001 From: "Logan C. Brooks" Date: Mon, 9 Dec 2024 22:39:54 -0800 Subject: [PATCH 1/2] Improve unsupported arg check messages in epi_slide_{sum,mean} --- R/slide.R | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/R/slide.R b/R/slide.R index e8fafa7a..761639d4 100644 --- a/R/slide.R +++ b/R/slide.R @@ -1010,8 +1010,9 @@ epi_slide_mean <- function( } if ("new_col_name" %in% provided_args || ".new_col_name" %in% provided_args) { cli::cli_abort( - "epi_slide_mean: the argument `new_col_name` is not supported. If you want to customize - the output column names, use `dplyr::rename` after the slide." + "epi_slide_opt: the argument `new_col_name` is not supported for `epi_slide_opt`. If you want to customize + the output column names, use `.prefix =`, `.suffix =`, or `.new_col_**names** =`.", + class = "epiprocess__epi_slide_opt__new_name_not_supported" ) } if ("names_sep" %in% provided_args || ".names_sep" %in% provided_args) { @@ -1069,8 +1070,9 @@ epi_slide_sum <- function( } if ("new_col_name" %in% provided_args || ".new_col_name" %in% provided_args) { cli::cli_abort( - "epi_slide_sum: the argument `new_col_name` is not supported. If you want to customize - the output column names, use `dplyr::rename` after the slide." + "epi_slide_opt: the argument `new_col_name` is not supported for `epi_slide_opt`. If you want to customize + the output column names, use `.prefix =`, `.suffix =`, or `.new_col_**names** =`.", + class = "epiprocess__epi_slide_opt__new_name_not_supported" ) } if ("names_sep" %in% provided_args || ".names_sep" %in% provided_args) { From 5da97c7bfd15b27195eb0637a6ce44aefb8ada43 Mon Sep 17 00:00:00 2001 From: "Logan C. Brooks" Date: Mon, 9 Dec 2024 22:40:28 -0800 Subject: [PATCH 2/2] Re-document --- man/epiprocess-package.Rd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/man/epiprocess-package.Rd b/man/epiprocess-package.Rd index b4f3e174..774d5f8a 100644 --- a/man/epiprocess-package.Rd +++ b/man/epiprocess-package.Rd @@ -16,12 +16,13 @@ Useful links: } \author{ -\strong{Maintainer}: Logan Brooks \email{lcbrooks@andrew.cmu.edu} +\strong{Maintainer}: Logan Brooks \email{lcbrooks+github@andrew.cmu.edu} Authors: \itemize{ \item Daniel McDonald \item Evan Ray + \item Dmitry Shemetov \item Ryan Tibshirani } @@ -34,7 +35,7 @@ Other contributors: \item Ken Mawer [contributor] \item Chloe You [contributor] \item Quang Nguyen [contributor] - \item Dmitry Shemetov [contributor] + \item David Weber \email{davidweb@andrew.cmu.edu} [contributor] \item Lionel Henry (Author of included rlang fragments) [contributor] \item Hadley Wickham (Author of included rlang fragments) [contributor] \item Posit (Copyright holder of included rlang fragments) [copyright holder]