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 d21c6bb commit 84c83e6
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 @@ -168,9 +168,10 @@ prep_hierarchical_data <- function(input_data,

bottom_level_temp_tbl <- input_data_adj %>%
dplyr::select(Combo, Date, tidyselect::all_of(regressor_var)) %>%
dplyr::rename(Value = tidyselect::all_of(regressor_var)) %>%
tidyr::pivot_wider(
names_from = Combo,
values_from = as.character(regressor_var)
values_from = Value
) %>%
dplyr::mutate_if(is.numeric, list(~ replace(., is.na(.), 0))) %>%
base::suppressWarnings()
Expand Down

0 comments on commit 84c83e6

Please sign in to comment.