Skip to content

Commit

Permalink
allow flexible by_group in matched_prioritized (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobvjk authored Aug 27, 2024
1 parent 550c345 commit 798fc9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions R/expected_columns.R
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"])
Expand Down
2 changes: 1 addition & 1 deletion R/run_aggregate_alignment_metric.R
Original file line number Diff line number Diff line change
Expand Up @@ -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----
Expand Down

0 comments on commit 798fc9c

Please sign in to comment.