Skip to content

Commit

Permalink
fix(epi[x]_slide, utils): fix .call args and actually use
Browse files Browse the repository at this point in the history
  • Loading branch information
brookslogan committed Oct 2, 2024
1 parent 793c9f7 commit c5b5b26
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/grouped_epi_archive.R
Original file line number Diff line number Diff line change
Expand Up @@ -313,14 +313,14 @@ epix_slide.grouped_epi_archive <- function(
}

.f_arg <- ".f" # dummy val, shouldn't be used since we're not using `.f`
.slide_comp <- as_diagonal_slide_computation(quosures, .f_arg = .f_arg, .call = caller_env())
.slide_comp <- as_diagonal_slide_computation(quosures, .f_arg = .f_arg)
# Magic value that passes zero args as dots in calls below. Equivalent to
# `... <- missing_arg()`, but use `assign` to avoid warning about
# improper use of dots.
assign("...", missing_arg())
} else {
used_data_masking <- FALSE
.slide_comp <- as_diagonal_slide_computation(.f, ..., .f_arg = caller_arg(.f), .call = caller_env())
.slide_comp <- as_diagonal_slide_computation(.f, ..., .f_arg = caller_arg(.f))
}

# Computation for one group, one time value
Expand Down
2 changes: 1 addition & 1 deletion R/slide.R
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ epi_slide <- function(
used_data_masking <- FALSE
.f_arg <- caller_arg(.f)
}
.slide_comp <- as_time_slide_computation(.f, ..., .f_arg = .f_arg, .call = caller_env())
.slide_comp <- as_time_slide_computation(.f, ..., .f_arg = .f_arg)

.align <- rlang::arg_match(.align)
time_type <- attr(.x, "metadata")$time_type
Expand Down
1 change: 1 addition & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ as_slide_computation <- function(.f, ..., .f_arg = caller_arg(.f), .call = calle
"*" = "If you were trying to use advanced features of the tidyeval interface such as `!! name_variable :=`, you might have forgotten the required leading comma."

Check warning on line 372 in R/utils.R

View workflow job for this annotation

GitHub Actions / lint

file=R/utils.R,line=372,col=121,[line_length_linter] Lines should not be more than 120 characters. This line is 171 characters.
),
parent = e,
call = .call,
class = "epiprocess__as_slide_computation__error_forcing_.f"
)
}
Expand Down

0 comments on commit c5b5b26

Please sign in to comment.