diff --git a/run_match_prioritize.R b/run_match_prioritize.R index 49ad59d6..a0745804 100644 --- a/run_match_prioritize.R +++ b/run_match_prioritize.R @@ -94,7 +94,7 @@ if (apply_sector_split & sector_split_type_select == "equal_weights") { } # prioritize and save files---- -for (i in 1:length(matched_lbk_manual)) { +for (i in seq_along(matched_lbk_manual)) { group_name <- unique(matched_lbk_manual[[i]]$group_id) ## prioritize matched loan book---- diff --git a/run_matching.R b/run_matching.R index bdecb334..bc14c1d5 100644 --- a/run_matching.R +++ b/run_matching.R @@ -168,7 +168,7 @@ raw_lbk <- readr::read_csv( dplyr::group_split(.data$group_id) # match and save loan books---- -for (i in 1:length(raw_lbk)) { +for (i in seq_along(raw_lbk)) { group_name <- unique(raw_lbk[[i]]$group_id) ## match data----