Skip to content

Commit 0b45656

Browse files
committed
add help text to errors
1 parent e8b3bb1 commit 0b45656

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

R/slide.R

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,13 +408,19 @@ epi_slide_opt <- function(x, col_names, f, ..., before = NULL, after = NULL, ref
408408
}
409409
if (!is.null(new_col_name)) {
410410
cli_abort(
411-
"`new_col_name` is not supported for `epi_slide_[opt/mean/sum]`",
411+
c(
412+
"`new_col_name` is not supported for `epi_slide_[opt/mean/sum]`",
413+
"i" = "If you want to customize the output column names, use [`dplyr::rename`] after the slide."
414+
),
412415
class = "epiprocess__epi_slide_opt__new_name_not_supported"
413416
)
414417
}
415418
if (!is.null(names_sep)) {
416419
cli_abort(
417-
"`names_sep` is not supported for `epi_slide_[opt/mean/sum]`",
420+
c(
421+
"`names_sep` is not supported for `epi_slide_[opt/mean/sum]`",
422+
"i" = "If you want to customize the output column names, use [`dplyr::rename`] after the slide."
423+
),
418424
class = "epiprocess__epi_slide_opt__name_sep_not_supported"
419425
)
420426
}

0 commit comments

Comments
 (0)