diff --git a/R/expected_columns.R b/R/expected_columns.R index b8107728..103402ba 100644 --- a/R/expected_columns.R +++ b/R/expected_columns.R @@ -64,7 +64,7 @@ col_types_abcd_final <- c( ) # expected columns matched_prioritized_all_groups file -col_types_matched_prioritized <- readr::cols_only( +col_types_matched_prioritized <- readr::cols( group_id = "c", id_loan = "c", id_direct_loantaker = "c", @@ -87,7 +87,8 @@ col_types_matched_prioritized <- readr::cols_only( name_abcd = "c", score = "n", source = "c", - borderline = "l" + borderline = "l", + .default = "c" ) col_select_matched_prioritized <- names(col_types_matched_prioritized[["cols"]]) col_standard_matched_prioritized <- c(col_select_matched_prioritized[!col_select_matched_prioritized == "group_id"]) diff --git a/R/run_aggregate_alignment_metric.R b/R/run_aggregate_alignment_metric.R index d9aee351..575afc9e 100644 --- a/R/run_aggregate_alignment_metric.R +++ b/R/run_aggregate_alignment_metric.R @@ -63,7 +63,7 @@ run_aggregate_alignment_metric <- function(config) { matched_prioritized <- readr::read_csv( file = file.path(dir_matched, list_matched_prioritized), col_types = col_types_matched_prioritized, - col_select = dplyr::all_of(col_select_matched_prioritized) + col_select = dplyr::all_of(c(by_group, col_select_matched_prioritized)) ) # aggregate P4B alignment----