Skip to content

Commit

Permalink
Merge pull request #32 from r-world-devs/adam.fix.autofilters-class
Browse files Browse the repository at this point in the history
Fix for autofilters
  • Loading branch information
krystian8207 authored Dec 20, 2022
2 parents f2d21ef + 5824d72 commit 7ea1151
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/source_tblist.R
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ rule_Date <- function(column, name, dataset_name) {
}

filter_rule <- function(column, name, dataset_name) {
rule_method <- paste0("rule_", class(column))
rule_method <- paste0("rule_", class(column)[[1]])
do.call(
rule_method,
list(
Expand All @@ -198,6 +198,7 @@ autofilter.tblist <- function(source, attach_as = c("step", "meta"), ...) {
step_rule <- source$dtconn %>%
purrr::imap(~filter_rules(.x, .y)) %>%
unlist(recursive = FALSE) %>%
purrr::discard(~is.null(.x)) %>%
purrr::map(~do.call(cohortBuilder::filter, .)) %>%
unname()

Expand Down

0 comments on commit 7ea1151

Please sign in to comment.