Skip to content

Commit 271aaaa

Browse files
committed
Improve unsupported arg check messages in epi_slide_{sum,mean}
1 parent 101aad8 commit 271aaaa

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

R/slide.R

+6-4
Original file line numberDiff line numberDiff line change
@@ -1010,8 +1010,9 @@ epi_slide_mean <- function(
10101010
}
10111011
if ("new_col_name" %in% provided_args || ".new_col_name" %in% provided_args) {
10121012
cli::cli_abort(
1013-
"epi_slide_mean: the argument `new_col_name` is not supported. If you want to customize
1014-
the output column names, use `dplyr::rename` after the slide."
1013+
"epi_slide_opt: the argument `new_col_name` is not supported for `epi_slide_opt`. If you want to customize
1014+
the output column names, use `.prefix =`, `.suffix =`, or `.new_col_**names** =`.",
1015+
class = "epiprocess__epi_slide_opt__new_name_not_supported"
10151016
)
10161017
}
10171018
if ("names_sep" %in% provided_args || ".names_sep" %in% provided_args) {
@@ -1069,8 +1070,9 @@ epi_slide_sum <- function(
10691070
}
10701071
if ("new_col_name" %in% provided_args || ".new_col_name" %in% provided_args) {
10711072
cli::cli_abort(
1072-
"epi_slide_sum: the argument `new_col_name` is not supported. If you want to customize
1073-
the output column names, use `dplyr::rename` after the slide."
1073+
"epi_slide_opt: the argument `new_col_name` is not supported for `epi_slide_opt`. If you want to customize
1074+
the output column names, use `.prefix =`, `.suffix =`, or `.new_col_**names** =`.",
1075+
class = "epiprocess__epi_slide_opt__new_name_not_supported"
10741076
)
10751077
}
10761078
if ("names_sep" %in% provided_args || ".names_sep" %in% provided_args) {

0 commit comments

Comments
 (0)