From 4fb755c9a8c58d47ea713b151560f3d3833a6f97 Mon Sep 17 00:00:00 2001 From: Zelos Zhu Date: Wed, 31 Jul 2024 16:46:12 +0000 Subject: [PATCH] more appropriate --- R/derive_params_growth_age.R | 2 +- R/derive_params_growth_height.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/derive_params_growth_age.R b/R/derive_params_growth_age.R index be6a0a9..cfd2904 100644 --- a/R/derive_params_growth_age.R +++ b/R/derive_params_growth_age.R @@ -281,7 +281,7 @@ derive_params_growth_age <- function(dataset, by_exprs <- enexpr(by_vars) by_antijoin <- setNames(as.character(by_exprs), as.character(by_exprs)) - unmatched_records <- anti_join(dataset, added_records, by = by_antijoin) %>% + unmatched_records <- anti_join(dataset2, added_records, by = by_antijoin) %>% filter(!!enexpr(parameter)) dataset_final <- dataset diff --git a/R/derive_params_growth_height.R b/R/derive_params_growth_height.R index c6f7b51..62e5bfa 100644 --- a/R/derive_params_growth_height.R +++ b/R/derive_params_growth_height.R @@ -268,7 +268,7 @@ derive_params_growth_height <- function(dataset, by_exprs <- enexpr(by_vars) by_antijoin <- setNames(as.character(by_exprs), as.character(by_exprs)) - unmatched_records <- anti_join(dataset, added_records, by = by_antijoin) %>% + unmatched_records <- anti_join(dataset2, added_records, by = by_antijoin) %>% filter(!!enexpr(parameter)) dataset_final <- dataset