|
39 | 39 | #' |
40 | 40 | #' @importFrom lubridate days weeks |
41 | 41 | #' @importFrom dplyr bind_rows group_vars filter select |
42 | | -#' @importFrom rlang .data .env !! enquo enquos sym env missing_arg |
| 42 | +#' @importFrom rlang .data .env !! enquos sym env missing_arg |
43 | 43 | #' @export |
44 | 44 | #' @seealso [`epi_slide_opt`] [`epi_slide_mean`] [`epi_slide_sum`] |
45 | 45 | #' @examples |
@@ -321,7 +321,7 @@ epi_slide <- function(x, f, ..., before = NULL, after = NULL, ref_time_values = |
321 | 321 | #' |
322 | 322 | #' @template opt-slide-details |
323 | 323 | #' |
324 | | -#' @importFrom dplyr bind_rows mutate %>% arrange tibble select |
| 324 | +#' @importFrom dplyr bind_rows mutate %>% arrange tibble select all_of |
325 | 325 | #' @importFrom rlang enquo quo_get_expr as_label expr_label caller_arg |
326 | 326 | #' @importFrom tidyselect eval_select |
327 | 327 | #' @importFrom purrr map map_lgl |
@@ -495,7 +495,7 @@ epi_slide_opt <- function(x, col_names, f, ..., before = NULL, after = NULL, ref |
495 | 495 | # positions of user-provided `col_names` into string column names. We avoid |
496 | 496 | # using `names(pos)` directly for robustness and in case we later want to |
497 | 497 | # allow users to rename fields via tidyselection. |
498 | | - pos <- eval_select(rlang::enquo(col_names), data = x, allow_rename = FALSE) |
| 498 | + pos <- eval_select(all_of(col_names), data = x, allow_rename = FALSE) |
499 | 499 | col_names_chr <- names(x)[pos] |
500 | 500 | # Always rename results to "slide_value_<original column name>". |
501 | 501 | result_col_names <- paste0("slide_value_", col_names_chr) |
|
0 commit comments