From 65adf499b1e701e8fc24d3d416648b1cefbaf767 Mon Sep 17 00:00:00 2001 From: egouldo Date: Tue, 3 Sep 2024 10:52:10 +1000 Subject: [PATCH] bug: exclude analysis with non-count-based dependent variable from `yi` analysis #145 --- _targets.R | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/_targets.R b/_targets.R index e3a12f1..b36c6c3 100644 --- a/_targets.R +++ b/_targets.R @@ -263,6 +263,22 @@ list(tarchetypes::tar_file_read(name = euc_reviews, all_prediction_data)), targets::tar_target(name = ManyEcoEvo_yi_results, command = ManyEcoEvo_yi %>% + mutate(data = + map_if(data, + ~ filter(.x, + stringr::str_detect(response_variable_name, + "average.proportion.of.plots.containing", + negate = TRUE)), + .p = dataset == "eucalyptus")) %>% + mutate( + diversity_data = + map2( + .x = diversity_data, + .y = data, + .f = ~ semi_join(.x, .y, join_by(id_col)) %>% + distinct() + ) + ) %>% prepare_response_variables( estimate_type = "yi", param_table =