Skip to content

Commit

Permalink
bug fix with missing data in drivers with future values
Browse files Browse the repository at this point in the history
  • Loading branch information
mitokic committed Oct 22, 2024
1 parent e7080fc commit 4a12ad6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/hierarchy.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ prep_hierarchical_data <- function(input_data,
.noexport = NULL
) %do% {
temp_tbl <- input_data_adj %>%
tidyr::drop_na(tidyselect::all_of(regressor_var)) %>%
dplyr::select(Date, tidyselect::all_of(value_level_iter), tidyselect::all_of(regressor_var)) %>%
dplyr::distinct()

Expand Down Expand Up @@ -144,6 +145,7 @@ prep_hierarchical_data <- function(input_data,

# agg by total
total_tbl <- input_data_adj %>%
tidyr::drop_na(tidyselect::all_of(regressor_var)) %>%
dplyr::select(Date, value_level[[1]], tidyselect::all_of(regressor_var)) %>%
dplyr::distinct() %>%
dplyr::group_by(Date) %>%
Expand Down

0 comments on commit 4a12ad6

Please sign in to comment.