Skip to content

Commit 461d607

Browse files
dajmcdondsweber2
andauthored
Apply suggestions from code review
Co-authored-by: David Weber <david.weber2@pm.me>
1 parent 79e5125 commit 461d607

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

R/step_epi_slide.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
#' Note that in cases 3 and 4, `x` can be any variable name you like (for
1919
#' example `\(dog) mean(dog, na.rm = TRUE)` will work). But in case 5, the
2020
#' argument must be named `.x`. A common, though very difficult to debug
21-
#' error is using something like `function(x) mean`. This will not work.
21+
#' error is using something like `function(x) mean`. This will not work
22+
#' because it returns the function mean, rather than `mean(x)`
2223
#' @param f_name a character string of at most 20 characters that describes
2324
#' the function. This will be combined with `prefix` and the columns in `...`
24-
#' to name the result using `{prefix}{f_name}_{column}`. It will be determined
25+
#' to name the result using `{prefix}{f_name}_{column}`. By default it will be determined
2526
#' automatically using `clean_f_name()`.
2627
#' @param before,after non-negative integers.
2728
#' How far `before` and `after` each `time_value` should
@@ -162,7 +163,7 @@ bake.step_epi_slide <- function(object, new_data, ...) {
162163
if (any(intersection)) {
163164
nms <- new_data_names[intersection]
164165
cli_abort(
165-
c("Name collision occured. The following variable names already exist:",
166+
c("In `step_epi_slide()` a name collision occurred. The following variable names already exist:",
166167
`*` = "{.var {nms}}"
167168
),
168169
call = caller_env()

0 commit comments

Comments
 (0)