Skip to content

Commit e5ec121

Browse files
authored
Merge pull request #582 from cmu-delphi/lcb/fix-slide-opt-validation
Improve `epi_slide_{sum,mean}` unsupported-arg messages.
2 parents 101aad8 + 5da97c7 commit e5ec121

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
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) {

man/epiprocess-package.Rd

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

0 commit comments

Comments
 (0)