From 75cdaa83a7923bc772374e6463430f83dcbc01f1 Mon Sep 17 00:00:00 2001 From: egouldo Date: Wed, 31 Jul 2024 19:14:22 +1000 Subject: [PATCH] #29 replace any NULL vals in list-col with NA - was causing problems for `map_if()` predicate check expressions in `make_viz()` --- R/meta_analyse_datasets.R | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/R/meta_analyse_datasets.R b/R/meta_analyse_datasets.R index d2916cd..6f1fd99 100644 --- a/R/meta_analyse_datasets.R +++ b/R/meta_analyse_datasets.R @@ -151,6 +151,12 @@ meta_analyse_datasets <- function(MA_data, filter_vars = NULL){ select(-ends_with("_colname")) } + out <- + out %>% #replace any NULL values with NA + mutate(across(everything(), + .fns = ~ coalesce(.x, list(NA))) + ) + return(out) }