From 3e007697a6e2c6b0ac394e40d1e646f73d966efd Mon Sep 17 00:00:00 2001 From: egouldo Date: Fri, 14 Jun 2024 10:17:02 +1000 Subject: [PATCH] #40 update fn to correctly subset for collinearity analysis --- R/generate_collinearity_subset.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/generate_collinearity_subset.R b/R/generate_collinearity_subset.R index 50193d6..8d21b14 100644 --- a/R/generate_collinearity_subset.R +++ b/R/generate_collinearity_subset.R @@ -53,10 +53,13 @@ generate_collinearity_subset <- function(ManyEcoEvo, collinearity_subset) { mutate(data = map(.x = data, .f = dplyr::anti_join, collinearity_subset, by = join_by(response_id, id_col, dataset) )) %>% + mutate(effects_analysis = map(.x = effects_analysis, + .f = dplyr::anti_join, collinearity_subset, + by = join_by(response_id, study_id == id_col, dataset) )) %>% mutate(diversity_data = map2(.x = diversity_data, .y = data, - .f = ~ semi_join(.x, .y) %>% distinct), + .f = ~ semi_join(.x, .y, join_by(id_col, dataset)) %>% distinct), collinearity_subset = "collinearity_removed") out <- bind_rows(