@@ -1031,7 +1031,8 @@ dplyr_col_modify.col_modify_recorder_df <- function(data, cols) {
1031
1031
# ' # that point:
1032
1032
# ' archive_cases_dv_subset %>%
1033
1033
# ' filter(version <= time_value + as.difftime(60, units = "days"),
1034
- # ' .format_aware = TRUE)
1034
+ # ' .format_aware = TRUE
1035
+ # ' )
1035
1036
# '
1036
1037
# ' @export
1037
1038
filter.epi_archive <- function (.data , ... , .by = NULL , .format_aware = FALSE ) {
@@ -1042,29 +1043,29 @@ filter.epi_archive <- function(.data, ..., .by = NULL, .format_aware = FALSE) {
1042
1043
} else {
1043
1044
out_tbl <- in_tbl %> %
1044
1045
filter(
1045
- # Add our own fake filter arg to the user's ..., to update the data mask
1046
- # to prevent `version` column usage.
1047
- {
1048
- # We should be evaluating inside the data mask. To disable both
1049
- # `version` and `.data$version`, we need to go to the data mask's
1050
- # ------
1051
- e <- environment()
1052
- while (! identical(e , globalenv()) && ! identical(e , emptyenv())) {
1053
- if (" version" %in% names(e )) {
1054
- # "version" is expected to be an active binding, and directly
1055
- # assigning over it has issues; explicitly `rm` first.
1056
- rm(list = " version" , envir = e )
1057
- delayedAssign(" version" , cli :: cli_abort(c(
1058
- " Using `version` in `filter` may produce unexpected results." ,
1059
- " >" = " See if `epix_as_of` or `epix_slide` would work instead." ,
1060
- " >" = " If not, see `?filter.epi_archive` details for how to proceed."
1061
- )), assign.env = e )
1062
- break
1046
+ # Add our own fake filter arg to the user's ..., to update the data mask
1047
+ # to prevent `version` column usage.
1048
+ {
1049
+ # We should be evaluating inside the data mask. To disable both
1050
+ # `version` and `.data$version`, we need to go to the data mask's
1051
+ # ------
1052
+ e <- environment()
1053
+ while (! identical(e , globalenv()) && ! identical(e , emptyenv())) {
1054
+ if (" version" %in% names(e )) {
1055
+ # "version" is expected to be an active binding, and directly
1056
+ # assigning over it has issues; explicitly `rm` first.
1057
+ rm(list = " version" , envir = e )
1058
+ delayedAssign(" version" , cli :: cli_abort(c(
1059
+ " Using `version` in `filter` may produce unexpected results." ,
1060
+ " >" = " See if `epix_as_of` or `epix_slide` would work instead." ,
1061
+ " >" = " If not, see `?filter.epi_archive` details for how to proceed."
1062
+ )), assign.env = e )
1063
+ break
1064
+ }
1065
+ e <- parent.env(e )
1063
1066
}
1064
- e <- parent.env(e )
1065
- }
1066
- TRUE
1067
- },
1067
+ TRUE
1068
+ },
1068
1069
... ,
1069
1070
.by = .by
1070
1071
)
0 commit comments