Skip to content

Commit

Permalink
error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mitokic committed Mar 4, 2024
1 parent 379d0ba commit d21c6bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/hierarchy.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d21c6bb

Please sign in to comment.