Skip to content

Commit 6ab73d5

Browse files
committed
feat(epi_slide_opt): guard against multiple .f matches
1 parent 6191b61 commit 6ab73d5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

R/slide.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,12 @@ epi_slide_opt <- function(
797797
epiprocess__f = .f
798798
)
799799
}
800+
if (nrow(f_info) > 1L) {
801+
cli_abort('epiprocess internal error: looking up `.f` in table of possible
802+
functions yielded multiple matches. Please report it using "New
803+
issue" at https://github.com/cmu-delphi/epiprocess/issues, using
804+
reprex::reprex to provide a minimal reproducible example.')
805+
}
800806
f_from_package <- f_info$package
801807

802808
user_provided_rtvs <- !is.null(.ref_time_values)

0 commit comments

Comments
 (0)