From d21c6bb05ae7b5ef9cd3ee85feef10d27b28d0f4 Mon Sep 17 00:00:00 2001 From: Mike Tokic Date: Sun, 3 Mar 2024 17:24:12 -0800 Subject: [PATCH] error fix --- R/hierarchy.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/hierarchy.R b/R/hierarchy.R index da0ab062..9d1ec34b 100644 --- a/R/hierarchy.R +++ b/R/hierarchy.R @@ -165,11 +165,12 @@ prep_hierarchical_data <- function(input_data, by = c("Combo", "Date") ) } else if (value_level == "All") { + bottom_level_temp_tbl <- input_data_adj %>% dplyr::select(Combo, Date, tidyselect::all_of(regressor_var)) %>% tidyr::pivot_wider( names_from = Combo, - values_from = tidyselect::all_of(regressor_var) + values_from = as.character(regressor_var) ) %>% dplyr::mutate_if(is.numeric, list(~ replace(., is.na(.), 0))) %>% base::suppressWarnings()